Dense#

class brainpy.dnn.Dense(num_in, num_out, W_initializer=XavierNormal(scale=1.0, mode=fan_avg, in_axis=-2, out_axis=-1, distribution=truncated_normal, rng=RandomState(Array((), dtype=key<fry>) overlaying: [ 216744582 1008666480])), b_initializer=ZeroInit, mode=None, name=None)[source]#

A linear transformation applied over the last dimension of the input.

Mathematically, this node can be defined as:

\[y = x \cdot weight + b\]
Parameters:
offline_fit(target, fit_record)[source]#

The offline training interface for the Dense node.

update(x)[source]#

The function to specify the updating rule.