create_layer: Create a network layer

Description Usage Arguments Value Author(s)

View source: R/create_layer.R

Description

This function generates a layer object represented as a list. The list contains all the information about the layer, such as number of inputs, weights and biases for every neuron in it.

Usage

1
create_layer(size, n_inputs, weights, biases, activation = sigmoid)

Arguments

size

The layer size, which is the number of neurons (integer)

n_inputs

The number of inputs to each neuron in the layer (integer)

weights

A weight array associated with each neuron. Note that the size of this array should be (size, n_inputs), where size is the number of neurons and n_inputs is the number of inputs to this layer. (matrix)

biases

A bias array associated with each neuron. Note that the size of this array should be (size, 1), where size is the number of neurons. (matrix)

activation

What activation function should be used. Default: sigmoid (function)

Value

A network layer object represented as a list.

Author(s)

Eduardo Kapp


eduardokapp/r_neural_network documentation built on Dec. 20, 2021, 3:21 a.m.