FileNotFoundError。尝试使用构造函数语法的完整路径

2024-10-01 22:29:57 发布

您现在位置:Python中文网/ 问答频道 /正文

输入:

from typing import Optional, List, Union
from torch_geometric.typing import OptPairTensor, Adj, Size, OptTensor

import torch
from torch import Tensor
from torch.nn import Parameter
import torch.nn.functional as F
from torch.nn import Sequential, Linear, ReLU, Dropout
from torch.nn import BatchNorm1d, LayerNorm, InstanceNorm1d


from torch_sparse import SparseTensor
from torch_scatter import scatter, scatter_softmax
from torch_geometric.nn.conv import MessagePassing
from torch_geometric.nn.norm import MessageNorm

输出:

FileNotFoundError: Could not find module 'C:\Users\won\anaconda3\envs\cpu_env\Lib\site-packages\torch_sparse\_convert.pyd' (or one of its dependencies). Try using the full path with constructor syntax.

对不起,我很抱歉

我检查了该文件在路径中不存在,但它在中。 实际上,我不明白什么是“尝试使用构造函数语法的完整路径”。我应该把它放在哪里?我的文件有什么问题?如何运行代码


Tags: 文件fromimport路径typingnntorchoptional

热门问题