随笔分类 - pytorch
摘要:pipreqs的安装 pip install pipreqs -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 在terminal中,如要查看test文件夹下脚本所依赖包,则输入如下命令: pipreqs ./test -
阅读全文
摘要:问题 ‘Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!’ 解决 方法1:x.to(device) 把 device 作为一个可变参数,推荐使用argparse
阅读全文