XCSF 1.4.8
XCSF learning classifier system
Loading...
Searching...
No Matches
neural_layer_lstm.h
Go to the documentation of this file.
1/*
2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 */
15
24#pragma once
25
26#include "neural_layer.h"
27
28void
29neural_layer_lstm_init(struct Layer *l, const struct ArgsLayer *args);
30
31struct Layer *
32neural_layer_lstm_copy(const struct Layer *src);
33
34void
36
37void
38neural_layer_lstm_forward(const struct Layer *l, const struct Net *net,
39 const double *input);
40
41void
42neural_layer_lstm_backward(const struct Layer *l, const struct Net *net,
43 const double *input, double *delta);
44
45void
46neural_layer_lstm_update(const struct Layer *l);
47
48void
49neural_layer_lstm_print(const struct Layer *l, const bool print_weights);
50
51bool
53
54void
55neural_layer_lstm_free(const struct Layer *l);
56
57double *
58neural_layer_lstm_output(const struct Layer *l);
59
60size_t
61neural_layer_lstm_save(const struct Layer *l, FILE *fp);
62
63size_t
64neural_layer_lstm_load(struct Layer *l, FILE *fp);
65
66void
67neural_layer_lstm_resize(struct Layer *l, const struct Layer *prev);
68
69char *
70neural_layer_lstm_json_export(const struct Layer *l, const bool return_weights);
71
Interface for neural network layers.
void neural_layer_lstm_backward(const struct Layer *l, const struct Net *net, const double *input, double *delta)
Backward propagates an LSTM layer.
void neural_layer_lstm_rand(struct Layer *l)
Randomises an LSTM layer weights.
bool neural_layer_lstm_mutate(struct Layer *l)
Mutates an LSTM layer.
char * neural_layer_lstm_json_export(const struct Layer *l, const bool return_weights)
Returns a json formatted string representation of an LSTM layer.
void neural_layer_lstm_free(const struct Layer *l)
Free memory used by an LSTM layer.
double * neural_layer_lstm_output(const struct Layer *l)
Returns the output from an LSTM layer.
size_t neural_layer_lstm_load(struct Layer *l, FILE *fp)
Reads an LSTM layer from a file.
static struct LayerVtbl const layer_lstm_vtbl
Neural long short-term memory layer implemented functions.
void neural_layer_lstm_resize(struct Layer *l, const struct Layer *prev)
Resizes an LSTM layer if the previous layer has changed size.
void neural_layer_lstm_print(const struct Layer *l, const bool print_weights)
Prints an LSTM layer.
size_t neural_layer_lstm_save(const struct Layer *l, FILE *fp)
Writes an LSTM layer to a file.
void neural_layer_lstm_update(const struct Layer *l)
Updates the weights and biases of an LSTM layer.
struct Layer * neural_layer_lstm_copy(const struct Layer *src)
Initialises and creates a copy of one LSTM layer from another.
void neural_layer_lstm_init(struct Layer *l, const struct ArgsLayer *args)
Initialises a long short-term memory layer.
void neural_layer_lstm_forward(const struct Layer *l, const struct Net *net, const double *input)
Forward propagates an LSTM layer.
Parameters for initialising a neural network layer.
Neural network layer interface data structure.
Neural network layer data structure.
double * delta
Delta for updating weights.
Neural network data structure.
Definition neural.h:48