MalConv-Pytorch
MalConv-Pytorch copied to clipboard
loss.cpu().data.numpy() is not a list
I might be because of the newest version of pytorch or something else, but loss.cpu().data.numpy()
is no longer a list and thus should be changed.
Before:
https://github.com/Alexander-H-Liu/MalConv-Pytorch/blob/939cb59ff1338dbc2b71a186f03bbc677b05c408/train.py#L151
https://github.com/Alexander-H-Liu/MalConv-Pytorch/blob/939cb59ff1338dbc2b71a186f03bbc677b05c408/train.py#L183
Now
history['tr_loss'].append(loss.cpu().data.numpy())
history['val_loss'].append(loss.cpu().data.numpy())
duplicate of ticket https://github.com/Alexander-H-Liu/MalConv-Pytorch/issues/1