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

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 16]) #2

Open
BinchaoPeng opened this issue Mar 10, 2021 · 0 comments

Comments

@BinchaoPeng
Copy link

Traceback (most recent call last):
File "/home/pbc/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/202.7660.27/plugins/python/helpers/pydev/pydevd.py", line 1448, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/pbc/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/202.7660.27/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/pbc/Documents/PycharmProjects/SICM6A/SICM6Acodes/2. train-test/SICM6A_train_DeepM6ASeqhsmmds.py", line 375, in
out = model(batch_x)
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/pbc/Documents/PycharmProjects/SICM6A/SICM6Acodes/2. train-test/SICM6A_train_DeepM6ASeqhsmmds.py", line 213, in forward
x_5 = self.fc_1(x_4)
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 136, in forward
self.weight, self.bias, bn_training, exponential_average_factor, self.eps)
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/functional.py", line 2054, in batch_norm
_verify_batch_size(input.size())
File "/home/pbc/anaconda3/envs/tf2_pt_kr2/lib/python3.6/site-packages/torch/nn/functional.py", line 2037, in _verify_batch_size
raise ValueError('Expected more than 1 value per channel when training, got input size {}'.format(size))
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 16])

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