Skip to content

Commit

Permalink
fix: cuda device mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
vejvarm committed Nov 17, 2023
1 parent fa4b3e2 commit d0ac77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def main():
PREDICATE_POINTER: SingleTaskLoss,
TYPE_POINTER: SingleTaskLoss,
MULTITASK: MultiTaskLoss
}[args.task](ignore_index=vocabs[LOGICAL_FORM].stoi[PAD_TOKEN])
}[args.task](ignore_index=vocabs[LOGICAL_FORM].stoi[PAD_TOKEN], device=DEVICE)

single_task_loss = SingleTaskLoss(ignore_index=vocabs[LOGICAL_FORM].stoi[PAD_TOKEN])

Expand Down

0 comments on commit d0ac77a

Please sign in to comment.