Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 53f1992

Browse files
ThomasDelteilszha
authored andcommitted
fix bug in utils.py (#163)
1 parent 80125ba commit 53f1992

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/word_embeddings/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def numba_njit(func):
4040
def get_context(args):
4141
if args.gpu is None or args.gpu == '':
4242
context = [mx.cpu()]
43+
elif isinstance(args.gpu, int):
44+
context = [mx.gpu(args.gpu)]
4345
else:
4446
context = [mx.gpu(int(i)) for i in args.gpu]
4547
return context

0 commit comments

Comments
 (0)