class brainpy.BPFF(target, loss_fun, optimizer=None, loss_has_aux=False, loss_auto_run=True, seed=None, shuffle_data=None, **kwargs)[source]#

The trainer implementing back propagation algorithm for feedforward neural networks.

For more parameters, users should refer to DSRunner.

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

Predict a series of input data with the given target model.

This function use the JIT compilation to accelerate the model simulation. Moreover, it can automatically monitor the node variables, states, inputs, feedbacks and its output.

  • inputs (ArrayType, dict) – The feedforward input data. It must be a 3-dimensional data which has the shape of (num_sample, num_time, num_feature).

  • reset_state (bool) – Whether reset the model states.

  • shared_args (optional, dict) – The shared arguments across different layers.

  • eval_time (bool) – Evaluate the time used for running.


output – The model output.

Return type:

ArrayType, dict