Skip to content

← deep_learning package

StepInit

Get initial state for an optimization step.

This node, along with "Apply Step" (StepApply) provides a purely functional programming interface to the optimization steps. This is an alternative way of using steps: the simplest way of using a step is to wire data into a step node, and it will behave statefully like any other filter node (e.g., FIRFilter). However, when exactly replicating Python code that uses optax, you may need to follow the functional programming pattern where the state is explicitly passed around. One concrete difference is that providing data to a step node for the first time will first initialize it, and then also update it on the given data before returning it and the processed outputs, whereas "Init Step" will return just the initial state before the first update was applied. The Init/Apply paradigm makes state explicit, but note that the same can also be accomplished with the plain Call node (see StepApply for a discussion). Version 0.2.0

Ports/Properties

step

Step to initialize.

  • verbose name: Step
  • default value: None
  • port type: DataPort
  • value type: BaseNode (can be None)
  • data direction: IN

params

Example gradients or weights.

  • verbose name: Params
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

state

Initialized state.

  • verbose name: State
  • default value: None
  • port type: DataPort
  • value type: dict (can be None)
  • data direction: OUT

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)