XCSF 1.4.8
XCSF learning classifier system
Loading...
Searching...
No Matches
Layer Struct Reference

Neural network layer data structure. More...

#include <neural_layer.h>

Collaboration diagram for Layer:
[legend]

Data Fields

int type
 Layer type: CONNECTED, DROPOUT, etc.
 
double * state
 Current neuron states (before activation function)
 
double * output
 Current neuron outputs (after activation function)
 
uint32_t options
 Bitwise layer options permitting evolution, SGD, etc.
 
double * weights
 Weights for calculating neuron states.
 
bool * weight_active
 Whether each connection is present in the layer.
 
double * biases
 Biases for calculating neuron states.
 
double * bias_updates
 Updates to biases.
 
double * weight_updates
 Updates to weights.
 
double * delta
 Delta for updating weights.
 
double * mu
 Mutation rates.
 
double eta
 Gradient descent rate.
 
double eta_max
 Maximum gradient descent rate.
 
double eta_min
 Minimum gradient descent rate.
 
double momentum
 Momentum for gradient descent.
 
double decay
 Weight decay for gradient descent.
 
int n_inputs
 Number of layer inputs.
 
int n_outputs
 Number of layer outputs.
 
int max_outputs
 Maximum number of neurons in the layer.
 
int max_neuron_grow
 Maximum number neurons to add per mutation event.
 
int n_weights
 Number of layer weights.
 
int n_biases
 Number of layer biases.
 
int n_active
 Number of active weights / connections.
 
int function
 Layer activation function.
 
double scale
 Usage depends on layer implementation.
 
double probability
 Usage depends on layer implementation.
 
struct LayerVtbl const * layer_vptr
 Functions acting on layers.
 
double * prev_state
 Previous state for recursive layers.
 
struct Layerinput_layer
 Recursive layer input.
 
struct Layerself_layer
 Recursive layer self.
 
struct Layeroutput_layer
 Recursive layer output.
 
int recurrent_function
 LSTM.
 
struct Layeruf
 LSTM.
 
struct Layerui
 LSTM.
 
struct Layerug
 LSTM.
 
struct Layeruo
 LSTM.
 
struct Layerwf
 LSTM.
 
struct Layerwi
 LSTM.
 
struct Layerwg
 LSTM.
 
struct Layerwo
 LSTM.
 
double * cell
 LSTM.
 
double * prev_cell
 LSTM.
 
double * f
 LSTM.
 
double * i
 LSTM.
 
double * g
 LSTM.
 
double * o
 LSTM.
 
double * c
 LSTM.
 
double * h
 LSTM.
 
double * temp
 LSTM.
 
double * temp2
 LSTM.
 
double * temp3
 LSTM.
 
double * dc
 LSTM.
 
int height
 Pool, Conv, and Upsample.
 
int width
 Pool, Conv, and Upsample.
 
int channels
 Pool, Conv, and Upsample.
 
int pad
 Pool and Conv.
 
int out_w
 Pool, Conv, and Upsample.
 
int out_h
 Pool, Conv, and Upsample.
 
int out_c
 Pool, Conv, and Upsample.
 
int size
 Pool and Conv.
 
int stride
 Pool, Conv, and Upsample.
 
int * indexes
 Pool.
 
int n_filters
 Conv.
 

Detailed Description

Neural network layer data structure.

Definition at line 73 of file neural_layer.h.

Field Documentation

◆ bias_updates

◆ biases

◆ c

◆ cell

◆ channels

◆ dc

◆ decay

◆ delta

◆ eta

◆ eta_max

◆ eta_min

◆ f

◆ function

◆ g

◆ h

◆ height

◆ i

◆ indexes

◆ input_layer

◆ layer_vptr

◆ max_neuron_grow

◆ max_outputs

int Layer::max_outputs

Maximum number of neurons in the layer.

Definition at line 92 of file neural_layer.h.

Referenced by layer_defaults(), layer_mutate_neurons(), neural_layer_avgpool_copy(), neural_layer_avgpool_init(), neural_layer_avgpool_load(), neural_layer_avgpool_resize(), neural_layer_avgpool_save(), neural_layer_connected_copy(), neural_layer_connected_init(), neural_layer_connected_load(), neural_layer_connected_save(), neural_layer_convolutional_copy(), neural_layer_convolutional_init(), neural_layer_convolutional_load(), neural_layer_convolutional_mutate_filter(), neural_layer_convolutional_save(), neural_layer_dropout_copy(), neural_layer_dropout_init(), neural_layer_dropout_load(), neural_layer_dropout_resize(), neural_layer_dropout_save(), neural_layer_lstm_copy(), neural_layer_lstm_init(), neural_layer_lstm_load(), neural_layer_lstm_save(), neural_layer_maxpool_copy(), neural_layer_maxpool_init(), neural_layer_maxpool_load(), neural_layer_maxpool_resize(), neural_layer_maxpool_save(), neural_layer_noise_copy(), neural_layer_noise_init(), neural_layer_noise_load(), neural_layer_noise_resize(), neural_layer_noise_save(), neural_layer_recurrent_copy(), neural_layer_recurrent_init(), neural_layer_recurrent_load(), neural_layer_recurrent_save(), neural_layer_softmax_copy(), neural_layer_softmax_init(), neural_layer_softmax_load(), neural_layer_softmax_resize(), neural_layer_softmax_save(), neural_layer_upsample_copy(), neural_layer_upsample_init(), neural_layer_upsample_load(), neural_layer_upsample_resize(), neural_layer_upsample_save(), and pred_neural_expand().

◆ momentum

◆ mu

◆ n_active

◆ n_biases

◆ n_filters

◆ n_inputs

int Layer::n_inputs

Number of layer inputs.

Definition at line 90 of file neural_layer.h.

Referenced by xcsf.utils.viz.DGPViz::__init__(), layer_add_neurons(), layer_defaults(), layer_ensure_input_represention(), layer_mutate_connectivity(), max_pool(), neural_insert(), neural_layer_avgpool_copy(), neural_layer_avgpool_init(), neural_layer_avgpool_json_export(), neural_layer_avgpool_load(), neural_layer_avgpool_resize(), neural_layer_avgpool_save(), neural_layer_connected_backward(), neural_layer_connected_copy(), neural_layer_connected_forward(), neural_layer_connected_init(), neural_layer_connected_json_export(), neural_layer_connected_load(), neural_layer_connected_resize(), neural_layer_connected_save(), neural_layer_convolutional_copy(), neural_layer_convolutional_init(), neural_layer_convolutional_json_export(), neural_layer_convolutional_load(), neural_layer_convolutional_resize(), neural_layer_convolutional_save(), neural_layer_dropout_backward(), neural_layer_dropout_copy(), neural_layer_dropout_forward(), neural_layer_dropout_init(), neural_layer_dropout_json_export(), neural_layer_dropout_load(), neural_layer_dropout_resize(), neural_layer_dropout_save(), neural_layer_lstm_copy(), neural_layer_lstm_init(), neural_layer_lstm_json_export(), neural_layer_lstm_load(), neural_layer_lstm_resize(), neural_layer_lstm_save(), neural_layer_maxpool_copy(), neural_layer_maxpool_init(), neural_layer_maxpool_json_export(), neural_layer_maxpool_load(), neural_layer_maxpool_resize(), neural_layer_maxpool_save(), neural_layer_noise_backward(), neural_layer_noise_copy(), neural_layer_noise_forward(), neural_layer_noise_init(), neural_layer_noise_json_export(), neural_layer_noise_load(), neural_layer_noise_resize(), neural_layer_noise_save(), neural_layer_recurrent_copy(), neural_layer_recurrent_init(), neural_layer_recurrent_json_export(), neural_layer_recurrent_load(), neural_layer_recurrent_resize(), neural_layer_recurrent_save(), neural_layer_softmax_backward(), neural_layer_softmax_copy(), neural_layer_softmax_forward(), neural_layer_softmax_init(), neural_layer_softmax_json_export(), neural_layer_softmax_load(), neural_layer_softmax_resize(), neural_layer_softmax_save(), neural_layer_upsample_copy(), neural_layer_upsample_init(), neural_layer_upsample_json_export(), neural_layer_upsample_load(), neural_layer_upsample_resize(), neural_layer_upsample_save(), neural_resize(), and pred_neural_expand().

◆ n_outputs

int Layer::n_outputs

Number of layer outputs.

Definition at line 91 of file neural_layer.h.

Referenced by cond_neural_neurons(), layer_add_neurons(), layer_defaults(), layer_ensure_input_represention(), layer_guard_outputs(), layer_mutate_connectivity(), layer_mutate_neurons(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), mutate_neurons(), mutate_neurons(), neural_create(), neural_insert(), neural_layer_avgpool_copy(), neural_layer_avgpool_init(), neural_layer_avgpool_json_export(), neural_layer_avgpool_load(), neural_layer_avgpool_resize(), neural_layer_avgpool_save(), neural_layer_connected_backward(), neural_layer_connected_copy(), neural_layer_connected_forward(), neural_layer_connected_init(), neural_layer_connected_json_export(), neural_layer_connected_load(), neural_layer_connected_resize(), neural_layer_connected_save(), neural_layer_convolutional_add_filters(), neural_layer_convolutional_backward(), neural_layer_convolutional_copy(), neural_layer_convolutional_forward(), neural_layer_convolutional_init(), neural_layer_convolutional_json_export(), neural_layer_convolutional_load(), neural_layer_convolutional_resize(), neural_layer_convolutional_save(), neural_layer_dropout_copy(), neural_layer_dropout_init(), neural_layer_dropout_json_export(), neural_layer_dropout_load(), neural_layer_dropout_resize(), neural_layer_dropout_save(), neural_layer_lstm_backward(), neural_layer_lstm_copy(), neural_layer_lstm_forward(), neural_layer_lstm_init(), neural_layer_lstm_json_export(), neural_layer_lstm_load(), neural_layer_lstm_resize(), neural_layer_lstm_save(), neural_layer_maxpool_backward(), neural_layer_maxpool_copy(), neural_layer_maxpool_forward(), neural_layer_maxpool_init(), neural_layer_maxpool_json_export(), neural_layer_maxpool_load(), neural_layer_maxpool_resize(), neural_layer_maxpool_save(), neural_layer_noise_copy(), neural_layer_noise_init(), neural_layer_noise_json_export(), neural_layer_noise_load(), neural_layer_noise_resize(), neural_layer_noise_save(), neural_layer_recurrent_backward(), neural_layer_recurrent_copy(), neural_layer_recurrent_forward(), neural_layer_recurrent_init(), neural_layer_recurrent_json_export(), neural_layer_recurrent_load(), neural_layer_recurrent_save(), neural_layer_softmax_copy(), neural_layer_softmax_init(), neural_layer_softmax_json_export(), neural_layer_softmax_load(), neural_layer_softmax_resize(), neural_layer_softmax_save(), neural_layer_upsample_copy(), neural_layer_upsample_init(), neural_layer_upsample_json_export(), neural_layer_upsample_load(), neural_layer_upsample_resize(), neural_layer_upsample_save(), neural_learn(), neural_mutate(), neural_remove(), pred_neural_expand(), pred_neural_neurons(), realloc_layer_arrays(), realloc_layer_arrays(), realloc_layer_arrays(), realloc_layer_arrays(), and reset_layer_deltas().

◆ n_weights

◆ o

◆ options

◆ out_c

int Layer::out_c

Pool, Conv, and Upsample.

Definition at line 132 of file neural_layer.h.

Referenced by layer_defaults(), mutate_neurons(), mutate_neurons(), neural_create(), neural_layer_avgpool_copy(), neural_layer_avgpool_init(), neural_layer_avgpool_load(), neural_layer_avgpool_resize(), neural_layer_avgpool_save(), neural_layer_connected_copy(), neural_layer_connected_init(), neural_layer_connected_load(), neural_layer_convolutional_add_filters(), neural_layer_convolutional_copy(), neural_layer_convolutional_init(), neural_layer_convolutional_load(), neural_layer_convolutional_resize(), neural_layer_convolutional_save(), neural_layer_dropout_copy(), neural_layer_dropout_init(), neural_layer_dropout_load(), neural_layer_dropout_resize(), neural_layer_dropout_save(), neural_layer_lstm_copy(), neural_layer_lstm_init(), neural_layer_lstm_load(), neural_layer_maxpool_copy(), neural_layer_maxpool_init(), neural_layer_maxpool_json_export(), neural_layer_maxpool_load(), neural_layer_maxpool_resize(), neural_layer_maxpool_save(), neural_layer_noise_copy(), neural_layer_noise_init(), neural_layer_noise_load(), neural_layer_noise_resize(), neural_layer_noise_save(), neural_layer_recurrent_copy(), neural_layer_recurrent_init(), neural_layer_recurrent_load(), neural_layer_softmax_copy(), neural_layer_softmax_init(), neural_layer_softmax_load(), neural_layer_softmax_resize(), neural_layer_upsample_copy(), neural_layer_upsample_init(), neural_layer_upsample_load(), neural_layer_upsample_resize(), and neural_layer_upsample_save().

◆ out_h

int Layer::out_h

Pool, Conv, and Upsample.

Definition at line 131 of file neural_layer.h.

Referenced by get_workspace_size(), layer_defaults(), mutate_neurons(), mutate_neurons(), neural_create(), neural_layer_avgpool_copy(), neural_layer_avgpool_init(), neural_layer_avgpool_load(), neural_layer_avgpool_resize(), neural_layer_avgpool_save(), neural_layer_connected_copy(), neural_layer_connected_init(), neural_layer_connected_load(), neural_layer_convolutional_add_filters(), neural_layer_convolutional_backward(), neural_layer_convolutional_copy(), neural_layer_convolutional_forward(), neural_layer_convolutional_init(), neural_layer_convolutional_load(), neural_layer_convolutional_resize(), neural_layer_convolutional_save(), neural_layer_dropout_copy(), neural_layer_dropout_init(), neural_layer_dropout_load(), neural_layer_dropout_resize(), neural_layer_dropout_save(), neural_layer_lstm_copy(), neural_layer_lstm_init(), neural_layer_lstm_load(), neural_layer_maxpool_copy(), neural_layer_maxpool_forward(), neural_layer_maxpool_init(), neural_layer_maxpool_json_export(), neural_layer_maxpool_load(), neural_layer_maxpool_resize(), neural_layer_maxpool_save(), neural_layer_noise_copy(), neural_layer_noise_init(), neural_layer_noise_load(), neural_layer_noise_resize(), neural_layer_noise_save(), neural_layer_recurrent_copy(), neural_layer_recurrent_init(), neural_layer_recurrent_load(), neural_layer_softmax_copy(), neural_layer_softmax_init(), neural_layer_softmax_load(), neural_layer_softmax_resize(), neural_layer_upsample_copy(), neural_layer_upsample_init(), neural_layer_upsample_load(), neural_layer_upsample_resize(), and neural_layer_upsample_save().

◆ out_w

int Layer::out_w

Pool, Conv, and Upsample.

Definition at line 130 of file neural_layer.h.

Referenced by get_workspace_size(), layer_defaults(), mutate_neurons(), mutate_neurons(), neural_create(), neural_layer_avgpool_copy(), neural_layer_avgpool_init(), neural_layer_avgpool_load(), neural_layer_avgpool_resize(), neural_layer_avgpool_save(), neural_layer_connected_copy(), neural_layer_connected_init(), neural_layer_connected_load(), neural_layer_convolutional_add_filters(), neural_layer_convolutional_backward(), neural_layer_convolutional_copy(), neural_layer_convolutional_forward(), neural_layer_convolutional_init(), neural_layer_convolutional_load(), neural_layer_convolutional_resize(), neural_layer_convolutional_save(), neural_layer_dropout_copy(), neural_layer_dropout_init(), neural_layer_dropout_load(), neural_layer_dropout_resize(), neural_layer_dropout_save(), neural_layer_lstm_copy(), neural_layer_lstm_init(), neural_layer_lstm_load(), neural_layer_maxpool_copy(), neural_layer_maxpool_forward(), neural_layer_maxpool_init(), neural_layer_maxpool_json_export(), neural_layer_maxpool_load(), neural_layer_maxpool_resize(), neural_layer_maxpool_save(), neural_layer_noise_copy(), neural_layer_noise_init(), neural_layer_noise_load(), neural_layer_noise_resize(), neural_layer_noise_save(), neural_layer_recurrent_copy(), neural_layer_recurrent_init(), neural_layer_recurrent_load(), neural_layer_softmax_copy(), neural_layer_softmax_init(), neural_layer_softmax_load(), neural_layer_softmax_resize(), neural_layer_upsample_copy(), neural_layer_upsample_init(), neural_layer_upsample_load(), neural_layer_upsample_resize(), and neural_layer_upsample_save().

◆ output

double* Layer::output

Current neuron outputs (after activation function)

Definition at line 76 of file neural_layer.h.

Referenced by free_layer_arrays(), free_layer_arrays(), free_layer_arrays(), free_layer_arrays(), free_layer_arrays(), layer_add_neurons(), layer_defaults(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), malloc_layer_arrays(), mutate_neurons(), neural_insert(), neural_layer_avgpool_forward(), neural_layer_avgpool_free(), neural_layer_avgpool_output(), neural_layer_connected_forward(), neural_layer_connected_free(), neural_layer_connected_output(), neural_layer_convolutional_add_filters(), neural_layer_convolutional_forward(), neural_layer_convolutional_free(), neural_layer_convolutional_output(), neural_layer_convolutional_resize(), neural_layer_dropout_forward(), neural_layer_dropout_output(), neural_layer_lstm_forward(), neural_layer_lstm_output(), neural_layer_maxpool_forward(), neural_layer_maxpool_free(), neural_layer_maxpool_output(), neural_layer_noise_forward(), neural_layer_noise_output(), neural_layer_recurrent_copy(), neural_layer_recurrent_forward(), neural_layer_recurrent_init(), neural_layer_recurrent_output(), neural_layer_softmax_forward(), neural_layer_softmax_output(), neural_layer_upsample_forward(), neural_layer_upsample_output(), neural_learn(), neural_remove(), realloc_layer_arrays(), realloc_layer_arrays(), and realloc_layer_arrays().

◆ output_layer

◆ pad

◆ prev_cell

double* Layer::prev_cell

◆ prev_state

◆ probability

◆ recurrent_function

◆ scale

◆ self_layer

◆ size

◆ state

◆ stride

◆ temp

◆ temp2

◆ temp3

◆ type

◆ uf

◆ ug

◆ ui

◆ uo

◆ weight_active

◆ weight_updates

◆ weights

◆ wf

◆ wg

◆ wi

◆ width

◆ wo


The documentation for this struct was generated from the following file: