
torch
Mooney安
路过的一只小白菜
展开
-
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory
安装torch时报错原创 2022-06-02 19:25:00 · 2205 阅读 · 0 评论 -
解决在anaconda中torch1.1.0下载过慢的问题Read timed out.
尝试了修改anaconda镜像源,完全按照网友的操作做完后,还是15KB/s左右的速度,龟速前进,最终Read timed out.我一度以为是我网速的问题。。。结果让小伙伴帮我测试了一下,差不多都是10-30kb的亚子。。。没用归没用,咱们还是乖乖先把镜像源修改了:1、在终端输入:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channe原创 2020-10-30 21:28:45 · 1020 阅读 · 5 评论 -
torch与cuda报错:ImportError: libcudart.so.9.1: cannot open shared object file: No such file or director
环境python3.6torch 1.1.0torchvision 0.1.6cuda 9.0安装cuda9.0conda install -c anaconda cudatoolkit==9.0首先,执行以下命令查看,看torch和cuda的版本是否匹配import torchprint(torch.__version__)print(torch.cuda.is_available())如果输出的结果为true,则说明cuda和torch的版本是匹配的,ok考虑是不是没有将cud原创 2020-10-29 15:24:15 · 1289 阅读 · 1 评论 -
报错subprocess.CalledProcessError: Command ‘[‘which‘, ‘g++‘]‘ returned non-zero exit status 1.
在安装torch的时候,torch安装成功,但是torch-cluster、torch-sparse等报错Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-56zzyn27/torch-sparse/setup.py", line 46, in <module> packages=find_package原创 2020-10-27 14:59:56 · 19452 阅读 · 7 评论 -
报错indexerror: tensors used as indices must be long, byte or bool tensors
报错Traceback (most recent call last): File "main.py", line 306, in <module> args_config=args_config, File "main.py", line 224, in train avg_reward, File "main.py", line 56, in train_one_epoch selected_neg_items_list, _ = sampler(bat原创 2020-10-24 11:29:39 · 14384 阅读 · 6 评论 -
RuntimeError: Expected object of scalar type Long but got scalar type Float for sequence element 1 i
报错Traceback (most recent call last): File "main.py", line 306, in <module> args_config=args_config, File "main.py", line 224, in train avg_reward, File "main.py", line 56, in train_one_epoch selected_neg_items_list, _ = sampler(bat原创 2020-10-24 10:11:19 · 1542 阅读 · 2 评论 -
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is Fal
跑pytorch时,出现如下错误:Traceback (most recent call last): File "main.py", line 306, in <module> args_config=args_config, File "main.py", line 184, in train paras = torch.load(args_config.data_path + args_config.model_path) File "/home/zzy/an原创 2020-10-24 09:17:22 · 2110 阅读 · 0 评论