brainpy.train.back_propagation.BPFF#

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

The trainer implementing back propagation algorithm for feedforward neural networks.

__init__(target, loss_fun, optimizer=None, loss_has_aux=False, shuffle_data=True, seed=None, numpy_mon_after_run=False, **kwargs)#

Methods

__init__(target, loss_fun[, optimizer, ...])

build_monitors(return_without_idx, ...)

f_grad([shared_args])

Get gradient function.

f_loss([shared_args, jit])

Get loss function.

f_predict([shared_args, jit])

f_train([shared_args])

Get training function.

fit(train_data[, batch_size, num_epoch, ...])

Fit the target model according to the given training and testing data.

format_monitors()

predict(inputs[, reset_state, shared_args, ...])

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

reset_state()

run(*args, **kwargs)

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

Attributes

train_loss_aux

train_losses

Training loss.