jefflai108 / Attentive-Filtering-Network

University of Edinbrugh-Johns Hopkins University's system for ASVspoof 2017 Version 2.0 dataset.
MIT License
49 stars 22 forks source link

AttributeError: 'tuple' object has no attribute 'size' #8

Closed SSSummer closed 4 years ago

SSSummer commented 4 years ago

Traceback (most recent call last): File "main.py", line 161, in train(args, model, device, train_loader, optimizer, epoch, rnn) File "/home/spoof-reply/afn/src/v1_training.py", line 27, in train loss = F.binary_cross_entropy(output, target) File "/home/python27/lib/python2.7/site-packages/torch/nn/functional.py", line 1592, in binary_cross_entropy if not (target.size() == input.size()): AttributeError: 'tuple' object has no attribute 'size'

the output type is 'turple'? it should be a 'tensor'? how I fix this problem?