Hi @mufeili , following our discussion on this topic here, I am trying to explain some new models with a very similar forward function as I had before:
def forward(self, graph,feat, eweight=None):
h = feat.type(torch.FloatTensor)
g.ndata['h'] = h
h = F.relu(self.conv1(graph, h))
if eweight is None:
graph.update_all(fn.copy_u('h', 'm'), fn.sum('m', 'h'))
else:
graph.edata['w'] = eweight
graph.update_all(fn.u_mul_e('h', 'w', 'm'), fn.sum('m', 'h'))
norm = self.w(g, graph.edata['w'])
h = F.relu(self.conv2(graph, h))
if eweight is None:
graph.update_all(fn.copy_u('h', 'm'), fn.sum('m', 'h'))
else:
graph.edata['w'] = eweight
graph.update_all(fn.u_mul_e('h', 'w', 'm'), fn.sum('m', 'h'))
norm = self.w(g, graph.edata['w'])
graph.ndata['h'] = h
hg = self.poolingLayer(graph,h)
a = F.relu(self.lin1(hg))
a = F.dropout(a,p=self.dropout)
return self.lin2(a)
But I am getting the error:
DGLError: [21:14:15] /opt/dgl/src/array/cpu/./spmm_blocking_libxsmm.h:82: Check notnull: edges
Stack trace:
[bt] (0) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4f) [0x7fec6b7d6c8f]
[bt] (1) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMCreateBlocks<long>(dgl::aten::CSRMatrix const&, dgl::aten::cpu::CSRMatrixInternal<long, long>*, long, long, long, long, bool, bool)+0x36a) [0x7fec6ba1e19a]
[bt] (2) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMRedopCsrOpt<long, float, dgl::aten::cpu::op::CopyRhs<float>, dgl::aten::cpu::op::Add<float> >(dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray)+0x1c6) [0x7fec6ba200b6]
[bt] (3) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMSumCsrLibxsmm<long, float, dgl::aten::cpu::op::CopyRhs<float> >(dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray)+0x73) [0x7fec6ba20383]
[bt] (4) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(void dgl::aten::cpu::SpMMSumCsr<long, float, dgl::aten::cpu::op::CopyRhs<float> >(dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray)+0x146) [0x7fec6ba3e3d6]
[bt] (5) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(void dgl::aten::SpMMCsr<1, long, 32>(std::string const&, std::string const&, dgl::BcastOff const&, dgl::aten::CSRMatrix const&, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, std::vector<dgl::runtime::NDArray, std::allocator<dgl::runtime::NDArray> >)+0xfeb) [0x7fec6ba51a4b]
[bt] (6) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::aten::SpMM(std::string const&, std::string const&, std::shared_ptr<dgl::BaseHeteroGraph>, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, std::vector<dgl::runtime::NDArray, std::allocator<dgl::runtime::NDArray> >)+0x244e) [0x7fec6ba859be]
[bt] (7) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(+0x5dd300) [0x7fec6baa5300]
[bt] (8) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(+0x5dd911) [0x7fec6baa5911]
Do you have any idea of what might be going on? I don’t understand what is triggering the error Thanks in advance!