Struct revonet::neuro::NeuralLayer [] [src]

pub struct NeuralLayer { /* fields omitted */ }

Structure to describe a layer for neural network.

Methods

impl NeuralLayer
[src]

Create a new layer with given size and activation function.

Arguments:

  • size - number of nodes.
  • actf - type of activation function.

Initializes weights of the layer.

Arguments:

  • inputs_num - number of inputs for the layer.
  • rng - mutable reference to the external RNG.

Compute output of the layer given a vector of input signals. To get outputs use get_outputs function.

Arguments:

  • xs -- input vector.

Returns number of inputs.

Return number of nodes in the layer.

Returns references to the slice, containing values of current outputs.

Return flattened vector of weights and biases.

Set weights and biases for the layer.

Arguments:

  • ws - vector of flattened weights.
  • bs - vector of biases.

Trait Implementations

impl Clone for NeuralLayer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for NeuralLayer
[src]

Formats the value using the given formatter.