Skip to content

opto.trace.containers

NodeContainer

An identifier for a container of nodes.

ParameterContainer

Bases: NodeContainer

A container of parameter nodes.

parameters

parameters()

Return a flattned list of all the parameters in the model's parameters_dict, useful for optimization.

parameters_dict

parameters_dict()

Return a dictionary of all the parameters in the model, including both trainable and non-trainable parameters. The dict contains ParameterNodes or ParameterContainers.

copy

copy()

Return a deep copy of the ParameterContainer except for the parameters are set to the originals.

Seq

Seq(*args)

Bases: UserList, ParameterContainer

Seq is defined as having a length and an index. Python's list/tuple will be converted to Seq

parameters_dict

parameters_dict()

Return a dictionary of all the parameters in the model, including both trainable and non-trainable parameters. The dict contains ParameterNodes or ParameterContainers.

Map

Map(mapping)

Bases: UserDict, ParameterContainer

Map is defined as key and value Python's dict will be converted to Map

parameters_dict

parameters_dict()

Return a dictionary of all the parameters in the model, including both trainable and non-trainable parameters. The dict contains ParameterNodes or ParameterContainers.

trainable_method

trainable_method(method)