HiDDeN icon indicating copy to clipboard operation
HiDDeN copied to clipboard

help! RuntimeError: result type Float can't be cast to the desired output type Long

Open asdjklfgh opened this issue 2 years ago • 4 comments

File "D:\AP\Anaconda\ANaconda\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "D:\AP\Anaconda\ANaconda\lib\site-packages\torch\nn\modules\loss.py", line 713, in forward return F.binary_cross_entropy_with_logits(input, target, File "D:\AP\Anaconda\ANaconda\lib\site-packages\torch\nn\functional.py", line 3132, in binary_cross_entropy_with_logits return torch.binary_cross_entropy_with_logits(input, target, weight, pos_weight, reduction_enum) RuntimeError: result type Float can't be cast to the desired output type Long

asdjklfgh avatar Oct 21 '22 09:10 asdjklfgh

Do you know how to solve this problem now?

newkinf avatar Feb 01 '23 06:02 newkinf

Do you know how to solve this problem now?

Do you know how to solve this problem now?...i have the same problem

Z1176893827 avatar Mar 08 '23 01:03 Z1176893827

Do you know how to solve this problem now?

Do you know how to solve this problem now?...i have the same problem

d_target_label_cover = d_target_label_cover.float() I solve this problem like this, by adding .float() behind the "d_target_label_cover "

newkinf avatar Mar 08 '23 01:03 newkinf

Do you know how to solve this problem now?

Do you know how to solve this problem now?...i have the same problem

d_target_label_cover = d_target_label_cover.float() I solve this problem like this, by adding .float() behind the "d_target_label_cover "

I had a problem when I was testing,If I want to adjust different attack intensity, for example, crop 0.5 to 0.8, do I need to retrain the model? If not, how do I adjust the attack intensity parameters

Z1176893827 avatar Jul 24 '23 01:07 Z1176893827