jactorch.nn.neural_logic.recurrent_layer#

Classes

Class RecurrentNeuralLogicMachine

class RecurrentNeuralLogicMachine[source]#

Bases: Module

__init__(breadth, depth1, depth2, depth3, input_dims, imm_dims1, imm_dims2, output_dims, epsilon, logic_model, logic_hidden_dim, exclude_self=True, pre_residual=False, connections=None)[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(inputs, max_depths=1000)[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.

classmethod from_args(input_dims, output_dims, args, prefix=None, **kwargs)[source]#
classmethod make_prog_block_parser(parser, defaults, prefix=None)[source]#