Sorry, I sent the error message wrong. The correct information is like this.
Traceback (most recent call last):
File "D:/zgy/GCC/GCC-SFCN-master/train.py", line 204, in <module>
main()
File "D:/zgy/GCC/GCC-SFCN-master/train.py", line 81, in main
validate(val_loader, net, epoch, restore_transform)
File "D:/zgy/GCC/GCC-SFCN-master/train.py", line 163, in validate
loss = np.mean(np.array(val_loss))
File "D:\Program Files\Anaconda3\envs\lei\lib\site-packages\numpy\core\fromnumeric.py", line 2957, in mean
out=out, **kwargs)
File "D:\Program Files\Anaconda3\envs\lei\lib\site-packages\numpy\core_methods.py", line 80, in _mean
ret = ret.dtype.type(ret / rcount)
AttributeError: ‘torch.dtype’ object has no attribute ‘type’