Skip to content
Permalink
Browse files

fix dna conv caching

  • Loading branch information...
rusty1s committed Aug 13, 2019
1 parent eb3bd02 commit f0f67711fdbd075ec5ed62fb3eea53e4906f0f81
Showing with 2 additions and 0 deletions.
  1. +2 −0 torch_geometric/nn/conv/dna_conv.py
@@ -249,9 +249,11 @@ def forward(self, x, edge_index, edge_weight=None):
self.cached_num_edges, edge_index.size(1)))

if not self.cached or self.cached_result is None:
self.cached_num_edges = edge_index.size(1)
edge_index, norm = GCNConv.norm(edge_index, x.size(0), edge_weight,
dtype=x.dtype)
self.cached_result = edge_index, norm

edge_index, norm = self.cached_result

return self.propagate(edge_index, x=x, norm=norm)

0 comments on commit f0f6771

Please sign in to comment.
You can’t perform that action at this time.