The error occurs on line 23 of /data/test/IEEE_TIP_SDEnet/network/discriminator.py. It seems that the nn.Linear() function is causing the error due to receiving incorrect arguments when calling torch.empty().
We would appreciate any help or advice you could offer regarding this issue. Thank you very much:)
Traceback (most recent call last):
File "/data/test/IEEE_TIP_SDEnet/train.py", line 257, in
experiment()
File "/data/test/IEEE_TIP_SDEnet/train.py", line 166, in experiment
D_net = discriminator.Discriminator(inchannel=N_BANDS, outchannel=args.pro_dim, num_classes=num_classes,
File "/data/test/IEEE_TIP_SDEnet/network/discriminator.py", line 23, in init
self.cls_head_src = nn.Linear(dim, num_classes)
File "/usr/local/anaconda3/envs/hyper_image/lib/python3.9/site-packages/torch/nn/modules/linear.py", line 86, in init
self.weight = Parameter(torch.empty((out_features, in_features), **factory_kwargs))
TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of:
I'm encountering a TypeError in our project and would like to inquire about it. The error message is as follows:
TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of:
The error occurs on line 23 of /data/test/IEEE_TIP_SDEnet/network/discriminator.py. It seems that the nn.Linear() function is causing the error due to receiving incorrect arguments when calling torch.empty().
We would appreciate any help or advice you could offer regarding this issue. Thank you very much:)