直接上报错的图:
解决方案:
python3.7已经移除了async关键字,而用non_blocking代替。
cuda() 本身也没有async. 构造函数如下:
cuda(device=None, non_blocking=False) → Tensor
在Pluralistic- Inpainting中有两个文件,共计四处需要修改:
文件为:model/pluralistic_model.py
gui/ui_model.py
相关链接:
https://pytorch.org/docs/0.4.0/notes/cuda.html#use-pinned-memory-buffers
错误的解决方案:
把async换成async_
还有博客把non_blocking写成了non-blocking,坑