Syntax Error from cuda(async=True)
cwloka opened this issue · 2 comments
cwloka commented
I am using Python 3.7 and I run into a syntax error from the lines which include target = target.cuda(async=True)
. Based on this StackOverflow answer I am guessing that async=True
should be replaced by non_blocking=True
, but I wanted to post this to verify if anyone else is running into this and can comment on whether this is a valid work-around.
syed-abdul-baqi commented
Yes, I changed and it worked fine for me.
Maruidear commented
是的,我进行了更改,对我来说效果很好。
Which version of pytorch do you use?