你好!我是Comate,很高兴能帮助你解答关于torch_geometric.nn模块中GCNConv类的导入问题。 模块和类名分析: 你尝试从torch_geometric.nn模块中导入一个名为gcnconv的类。 模块名检查: torch_geometric.nn是torch_geometric库中的一个子模块,专门用于图神经网络(Graph Neural Networks, GNNs)的层构建。这个模块名是...
(3)将全连接层替换成GCN层 fromtorch_geometric.nnimportGCNConvclassGCN(torch.nn.Module):def__init__(self, hidden_channels):super().__init__() torch.manual_seed(1234567) self.conv1 = GCNConv(dataset.num_features, hidden_channels)#GCN层,1433,16self.conv2 = GCNConv(hidden_channels, dataset...
File "/home/libj/.conda/envs/CONTROLNET2/lib/python3.8/site-packages/torch_geometric/nn/conv/gmm_conv.py", line 138, in forward out: OptPairTensor = (torch.matmul(x[0], self.g), x[1]) RuntimeError: mat1 and mat2 shapes cannot be multiplied (42502x5 and 3x240) ...