MCPcopy Create free account
hub / github.com/RolnickLab/climart / forward

Method forward

climart/models/GraphNet/graph_network.py:81–92  ·  view source on GitHub ↗

input: Dict with key-values {GLOBALS: x_glob, LEVELS: x_lev, LAYERS: x_lay}, where x_*** are the corresponding features.

(self, input: Dict[str, Tensor])

Source from the content-addressed store, hash-verified

79 layer.update_graph_structure(senders, receivers)
80
81 def forward(self, input: Dict[str, Tensor]):
82 """
83 input:
84 Dict with key-values {GLOBALS: x_glob, LEVELS: x_lev, LAYERS: x_lay},
85 where x_*** are the corresponding features.
86 """
87 graph_new = self.update_graph(input)
88 if self.output_type is not None and self.output_type != 'graph':
89 graph_component = graph_new[self.output_type]
90 return graph_component.reshape(graph_component.shape[0], -1)
91 else:
92 return graph_new
93
94 def update_graph(self, input: Dict[str, Tensor]) -> Dict[str, Tensor]:
95 graph_net_input = input

Callers

nothing calls this directly

Calls 1

update_graphMethod · 0.95

Tested by

no test coverage detected