43 const double *input,
double *
delta);
71 const bool return_weights);
Interface for neural network layers.
void neural_layer_maxpool_print(const struct Layer *l, const bool print_weights)
Prints a maxpooling layer.
void neural_layer_maxpool_init(struct Layer *l, const struct ArgsLayer *args)
Initialises a 2D maxpooling layer.
void neural_layer_maxpool_rand(struct Layer *l)
Dummy function since maxpooling layers have no weights.
void neural_layer_maxpool_resize(struct Layer *l, const struct Layer *prev)
Resizes a maxpooling layer if the previous layer has changed size.
static struct LayerVtbl const layer_maxpool_vtbl
Neural maxpooling layer implemented functions.
void neural_layer_maxpool_update(const struct Layer *l)
Dummy function since a maxpooling layer has no weights.
void neural_layer_maxpool_free(const struct Layer *l)
Free memory used by a maxpooling layer.
struct Layer * neural_layer_maxpool_copy(const struct Layer *src)
Initialises and creates a copy of one maxpooling layer from another.
bool neural_layer_maxpool_mutate(struct Layer *l)
Dummy function since a maxpooling layer cannot be mutated.
double * neural_layer_maxpool_output(const struct Layer *l)
Returns the output from a maxpooling layer.
char * neural_layer_maxpool_json_export(const struct Layer *l, const bool return_weights)
Returns a json formatted string representation of a maxpooling layer.
size_t neural_layer_maxpool_save(const struct Layer *l, FILE *fp)
Writes a maxpooling layer to a file.
void neural_layer_maxpool_forward(const struct Layer *l, const struct Net *net, const double *input)
Forward propagates a maxpooling layer.
size_t neural_layer_maxpool_load(struct Layer *l, FILE *fp)
Reads a maxpooling layer from a file.
void neural_layer_maxpool_backward(const struct Layer *l, const struct Net *net, const double *input, double *delta)
Backward propagates a maxpooling 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.