DSTrainer#

class brainpy.DSTrainer(target, **kwargs)[source]#

Structural Trainer for Dynamical Systems.

For more parameters, users should refer to DSRunner.

Parameters:
predict(inputs, reset_state=False, shared_args=None, eval_time=False)[source]#

Prediction function.

Parameters:
  • inputs (Any) – The input values.

  • reset_state (bool) – Reset the target state before running.

  • eval_time (bool) – Whether we evaluate the running time or not?

  • shared_args (Optional[Dict]) – The shared arguments across nodes.

Return type:

TypeVar(Output)

Returns:

  • output (ArrayType, sequence of ArrayType, dict of ArrayType) – The running output.

target: DynamicalSystem#

The training target.

train_nodes: Sequence[DynamicalSystem]#

All children nodes in this training target.