sketchgraphs_models.nn.ConcatenateLinear

class sketchgraphs_models.nn.ConcatenateLinear(left_size, right_size, output_size)

A torch module which concatenates several inputs and mixes them using a linear layer.

__init__(left_size, right_size, output_size)

Creates a new concatenating linear layer.

Parameters
  • left_size (int) – Size of the left input

  • right_size (int) – Size of the right input

  • output_size (int) – Size of the output.

forward(left, right)

Defines 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.