Error while Training shapenet
Closed this issue · 3 comments
My env:
win10、python3.7、cuda10.1、pytorch1.6
Please have a look at following error:
Let's use 1 GPUs!
Training from scratch...
The number of training data is:%d 13998 The number of test data is:%d 2874 Use Adam
Use StepLR
0%| | 0/3499 [00:02<?, ?it/s]
Traceback (most recent call last):
File "C:/Users/Keen/Desktop/Project/Github/GDANet/main_ptseg.py", line 440, in
train(args, io)
File "C:/Users/Keen/Desktop/Project/Github/GDANet/main_ptseg.py", line 126, in train
train_epoch(train_loader, model, opt, scheduler, epoch, num_part, num_classes, io)
File "C:/Users/Keen/Desktop/Project/Github/GDANet/main_ptseg.py", line 201, in train_epoch
loss = torch.mean(loss)
UnboundLocalError: local variable 'loss' referenced before assignment
The loss variable is indeed not defined above.
Same error on unbutu16.04
Thank you! I'll try it