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 72, in main
i_tb = train(train_loader, net, optimizer, epoch, i_tb)
File "D:/zgy/GCC/GCC-SFCN-master/train.py", line 105, in train
writer.add_scalar(‘train_loss’, loss.data[0], i_tb)
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
AttributeError: ‘torch.dtype’ object has no attribute ‘type’