Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for the architecture #9

Open
MJ1021 opened this issue Nov 15, 2020 · 0 comments
Open

Question for the architecture #9

MJ1021 opened this issue Nov 15, 2020 · 0 comments

Comments

@MJ1021
Copy link

MJ1021 commented Nov 15, 2020

Hello. I'm a pretty newcomer to Pytorch. so my question may be a low-quality question.
When I download and run your code under CAE_5 architecture, I got an error message as follow:

Traceback (most recent call last):
File "torch_DCEC.py", line 347, in
model = eval(to_eval)
File "", line 1, in
File "/home/xxx/python35/torch_DCEC/nets.py", line 362, in init
self.embedding = nn.Linear(lin_features_len, num_clusters, bias=bias)
File "/home/xxx/.local/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 81, in init
self.reset_parameters()
File "/home/xxx/.local/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 84, in reset_parameters
init.kaiming_uniform
(self.weight, a=math.sqrt(5))
File "/home/xxx/.local/lib/python3.6/site-packages/torch/nn/init.py", line 325, in kaiming_uniform_
std = gain / math.sqrt(fan)
ZeroDivisionError: float division by zero_

Also, when I tried CAE_4 and CAE_bn4, I got error messages as follow:
RuntimeError: The size of tensor a (20) must match the size of tensor b (28) at non-singleton dimension 3

Could you let me know how to fix it? Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant