MalConv-Pytorch icon indicating copy to clipboard operation
MalConv-Pytorch copied to clipboard

When I run train.py

Open hawk90 opened this issue 5 years ago • 1 comments

pytorch version: 0.4.0 pandas version: 0.24.1

python3 train.py config/example.yaml 123 --> Experiment: example_sd_123 Training Set: Total 2 files Malware Count : 1 Goodware Count: 1 Validation Set: Total 2 files Malware Count : 1 Goodware Count: 1 Traceback (most recent call last): File "train.py", line 151, in history['tr_loss'].append(loss.cpu().data.numpy()[0]) IndexError: too many indices for array

hawk90 avatar Mar 18 '19 02:03 hawk90

I changed it.

File "train.py", line 151, in history['tr_loss'].append(loss.cpu().data.numpy()[0]) --> history['tr_loss'].append(loss.cpu().data.numpy())

File "train.py", line 183, in history['val_loss'].append(loss.cpu().data.numpy()[0]) --> history['val_loss'].append(loss.cpu().data.numpy())

hawk90 avatar Mar 18 '19 03:03 hawk90