graph module

Full Documentation for hippynn.graphs.graph module. Click here for a summary page.

Core GraphModule that implements node computations

class GraphModule(required_inputs, nodes_to_compute)[source]

Bases: Module

extra_repr()[source]

Set the extra representation of the module.

To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.

forward(*input_values)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

get_module(node)[source]
node_from_name(name)[source]
print_structure(suppress=True)[source]

Pretty-print the structure of the nodes and links comprising this graph.