battelle.nn.Layer

class battelle.nn.Layer(neuron_count, activation_function='sigmoid', input_dim=None)

An instance of a layer

A layer contains a number of neurons. Each layer has an input dimension, which must be specified if it is the first layer of a neural network, and an activation function.

neuron_count

The number of neurons in the layer

Type

int

activation_function

Activation function to use (tanh, sigmoid…)

Type

String

input_dim

The number of input dimensions

Type

int

__init__(neuron_count, activation_function='sigmoid', input_dim=None)

Methods

__init__(neuron_count[, ...])

forward(x)

Returns the output of each neuron of the layer for input x.

Attributes

activation_function

input_dim

neuron_count

neurons