Hello, my code contains dgl graph construction as follows:
def construct_graph(self,
position: Tensor,
self_edge: bool = True):
"""
:param position: particle positions [#. particles, dim]
:param self_edge:
:return: dgl graph
"""
return dgl.radius_graph(position, self.connectivity_radius, self_edge)
When running the code, the error is as follows:
~~~~
D:\PyCharms\PytorchGNS\gns\gns.py in <listcomp>(.0)
140 # construct graph
141 batched_g = dgl.batch([self.construct_graph(p[:, -1, :],
--> 142 self_edge) for p in positions.split(list(num_particles))])
143 batched_g = batched_g.to(device)
144
D:\PyCharms\PytorchGNS\gns\gns.py in construct_graph(self, position, self_edge)
198 """
199
--> 200 return dgl.radius_graph(position, self.connectivity_radius, self_edge)
201
202 def _compute_ef(self, edges):
AttributeError: module 'dgl' has no attribute 'radius_graph'
I check the installation info and checked that dgl version 0.9.0 is properly installed. I don't know why it does not recognize 'radius_graph' attribute. Can anyone help??