43 const double *input,
double *
delta);
71 const bool return_weights);
Interface for neural network layers.
void neural_layer_upsample_print(const struct Layer *l, const bool print_weights)
Prints an upsampling layer.
void neural_layer_upsample_resize(struct Layer *l, const struct Layer *prev)
Resizes an upsampling layer if the previous layer has changed size.
double * neural_layer_upsample_output(const struct Layer *l)
Returns the output from an upsampling layer.
size_t neural_layer_upsample_save(const struct Layer *l, FILE *fp)
Writes an upsampling layer to a file.
static struct LayerVtbl const layer_upsample_vtbl
Neural upsampling layer implemented functions.
void neural_layer_upsample_backward(const struct Layer *l, const struct Net *net, const double *input, double *delta)
Backward propagates an upsampling layer.
void neural_layer_upsample_free(const struct Layer *l)
Free memory used by an upsampling layer.
void neural_layer_upsample_forward(const struct Layer *l, const struct Net *net, const double *input)
Forward propagates an upsampling layer.
void neural_layer_upsample_rand(struct Layer *l)
Dummy function since upsampling layers have no weights.
bool neural_layer_upsample_mutate(struct Layer *l)
Dummy function since upsampling layers cannot be mutated.
void neural_layer_upsample_update(const struct Layer *l)
Dummy function since upsampling layers have no weights.
void neural_layer_upsample_init(struct Layer *l, const struct ArgsLayer *args)
Initialises a 2D upsampling layer.
size_t neural_layer_upsample_load(struct Layer *l, FILE *fp)
Reads an upsampling layer from a file.
char * neural_layer_upsample_json_export(const struct Layer *l, const bool return_weights)
Returns a json formatted string representation of an upsample layer.
struct Layer * neural_layer_upsample_copy(const struct Layer *src)
Initialises and copies one upsampling layer from another.
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.