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

Seems like a bug while training my own module... #32

Closed
fhfhfh999 opened this issue Aug 8, 2022 · 1 comment
Closed

Seems like a bug while training my own module... #32

fhfhfh999 opened this issue Aug 8, 2022 · 1 comment

Comments

@fhfhfh999
Copy link

==== Epoch [ 1 / 10 ] START ====
<<<= Phase: train =>>>
D:\Data\quickNAT_pytorch-master\venv\lib\site-packages\torch\optim\lr_scheduler.py:131: UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
warnings.warn("Detected call of lr_scheduler.step() before optimizer.step(). "
Traceback (most recent call last):
File "D:\Data\quickNAT_pytorch-master\run.py", line 187, in
train(train_params, common_params, data_params, net_params)
File "D:\Data\quickNAT_pytorch-master\run.py", line 57, in train
solver.train(train_loader, val_loader)
File "D:\Data\quickNAT_pytorch-master\solver.py", line 113, in train
output = model(X)
File "D:\Data\quickNAT_pytorch-master\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Data\quickNAT_pytorch-master\quicknat.py", line 49, in forward
e1, out1, ind1 = self.encode1.forward(input)
File "D:\Data\quickNAT_pytorch-master\venv\lib\site-packages\nn_common_modules\modules.py", line 151, in forward
out_block = self.SELayer(out_block, weights)
File "D:\Data\quickNAT_pytorch-master\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() takes 2 positional arguments but 3 were given

I don't know whether it is a bug or my wrong operation...

@fhfhfh999
Copy link
Author

pytorch version cause this bug.

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