Skip to content

Update train.py#2

Open
jss367 wants to merge 1 commit intolnsmith54:masterfrom
jss367:master
Open

Update train.py#2
jss367 wants to merge 1 commit intolnsmith54:masterfrom
jss367:master

Conversation

@jss367
Copy link

@jss367 jss367 commented Aug 9, 2020

I'm getting the following error when I run this:

Exception has occurred: RuntimeError
Expected object of scalar type Long but got scalar type Int for argument #2 'target' in call to _thnn_nll_loss_forward
  File "C:\Users\Julius\Documents\GitHub\BOSS\PT-BOSS\train.py", line 133, in train_one_epoch
    loss_x = criteria_x(logits_x, lbs_x)
  File "C:\Users\Julius\Documents\GitHub\BOSS\PT-BOSS\train.py", line 302, in train
    train_one_epoch(**train_args)
  File "C:\Users\Julius\Documents\GitHub\BOSS\PT-BOSS\train.py", line 316, in <module>
    train()

I think this is because some of the variables are Ints but they need to be Longs, so I've converted them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant