opto.trace.containers#

Module Contents#

Classes#

NodeContainer

An identifier for a container of nodes.

ParameterContainer

A container of parameter nodes.

Seq

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

Map

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

Functions#

trainable_method

API#

class NodeContainer[source]#

An identifier for a container of nodes.

trainable_method(method)[source]#
class ParameterContainer[source]#

Bases: opto.trace.containers.NodeContainer

A container of parameter nodes.

parameters()[source]#

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

parameters_dict()[source]#

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

class Seq(*args)[source]#

Bases: collections.UserList, opto.trace.containers.ParameterContainer

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

Initialization

parameters_dict()[source]#

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

class Map(mapping)[source]#

Bases: collections.UserDict, opto.trace.containers.ParameterContainer

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

Initialization

parameters_dict()[source]#

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