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

Structural Trainer for Dynamical Systems.

For more parameters, users should refer to DSRunner.

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

Prediction function.

  • inputs (ArrayType, sequence of ArrayType, dict of ArrayType) – 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 (dict) – The shared arguments across nodes.


output – The running output.

Return type:

ArrayType, sequence of ArrayType, dict of ArrayType

target: DynamicalSystem#

The training target.

train_nodes: Sequence[DynamicalSystem]#

All children nodes in this training target.