TypeError: add_() received an invalid combination of arguments - got (complex, Tensor)
See original GitHub issueI have git checkout d1ec858
, but after completing 40000 steps, then error happened.
INFO step:40000 G_lr:0.000000 G_loss:113.60744(mc:0.13908 pixelwise:113.43781 pairwise:0.00256) D_lr:0.000000 D_loss:0.01955
Traceback (most recent call last):
File "train_and_eval.py", line 25, in <module>
model.optimize_parameters()
File "/home/shine/文档/structure_knowledge_distillation/networks/kd_model.py", line 171, in optimize_parameters
self.G_solver.step()
File "/home/shine/anaconda3/envs/wangnan/lib/python3.6/site-packages/torch/optim/sgd.py", line 107, in step
p.data.add_(-group['lr'], d_p)
TypeError: add_() received an invalid combination of arguments - got (complex, Tensor), but expected one of:
* (Tensor other, Number alpha)
didn't match because some of the arguments have invalid types: (complex, Tensor)
* (Number other, Number alpha)
didn't match because some of the arguments have invalid types: (complex, Tensor)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Pytorch TypeError: eq() received an invalid combination of ...
item() TypeError: eq() received an invalid combination of arguments - got (numpy.ndarray), but expected one of: * (Tensor other) didn't match ...
Read more >multidim operators · Issue #9703 · pytorch/pytorch - GitHub
TypeError : std() received an invalid combination of arguments - got (Tensor, tuple), but expected one of: > * (Tensor input, bool unbiased) ......
Read more >TypeError: new() received an invalid combination of arguments
Tensor (out_features, in_features)) TypeError: new() received an invalid combination of arguments - got (Tensor, int), but expected one of: ...
Read more >maisteru/01-tensor-operations - Jovian
Collaborate with maisteru on 01-tensor-operations notebook. ... 5 print(output) TypeError: ge() received an invalid combination of arguments - got (Tensor, ...
Read more >TypeError: eq received an invalid combination of arguments
LongTensor ), but expected one of … So finally I changed this line to: targs = torch.from_numpy(targs).cuda(). To get this tensor on the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Exactly the same problem with you
I did not use the official pre-trained model, I downloaded the pre-trained model from here. No error was reported, but the final result has not been seen yet.