opto.trace.nodes.ParameterNode

opto.trace.nodes.ParameterNode#

class ParameterNode[source]#

Initialize an instance of the Node class.

Parameters:
  • value – The value to be assigned to the node.

  • name – The name of the node (optional).

  • trainable – A boolean indicating whether the node is trainable or not (optional).

  • description – A string describing the node (optional).

  • constraint – A string describing constraints on the node (optional).

  • info – A dictionary containing additional information about the node (optional).

Attributes

children

Get the children of a node.

data

Retrieve the internal data of a node.

description

A textual description of the node.

expandable_dependencies

The depended expandable nodes.

feedback

The feedback from children nodes.

id

Get the identifier part of the node's name.

info

Additional information about the node.

is_leaf

Check if the node is a leaf node.

is_root

Check if the node is a root node.

level

Get the level of the node in the graph.

name

Get the name of the node.

parameter_dependencies

The depended parameters.

parents

Get the parents of a node.

py_name

Get the Python-friendly name of the node.

type

The type of the data stored in the node.

Methods

append(*args, **kwargs)

backward([feedback, propagator, ...])

Performs a backward pass in a computational graph.

call(fun, *args, **kwargs)

Call the function with the specified arguments and keyword arguments.

capitalize()

clone()

Create and return a duplicate of the current Node object.

detach()

Create and return a deep copy of the current instance of the Node class.

eq(other)

Check if the node is equal to another value.

format(*args, **kwargs)

getattr(key)

Get the attribute of the node with the specified key.

gt(other)

Compare if this node's level is greater than another node's level.

items()

join(seq)

keys()

len()

Return the length of the node.

lower()

lt(other)

Compare if this node's level is less than another node's level.

neq(other)

Check if the node is not equal to another value.

pop([_Node__index])

replace(old, new[, count])

split([sep, maxsplit])

strip([chars])

swapcase()

title()

upper()

values()

zero_feedback()

Zero out the feedback of the node.

__init__(value, *, name=None, trainable=True, description='[ParameterNode] This is a ParameterNode in a computational graph.', constraint=None, info=None) β†’ None[source]#

Initialize an instance of the Node class.

Parameters:
  • value – The value to be assigned to the node.

  • name – The name of the node (optional).

  • trainable – A boolean indicating whether the node is trainable or not (optional).

  • description – A string describing the node (optional).

  • constraint – A string describing constraints on the node (optional).

  • info – A dictionary containing additional information about the node (optional).

__new__(**kwargs)#