42 const double *input,
double *
delta);
70 const bool return_weights);
Interface for neural network layers.
double * neural_layer_softmax_output(const struct Layer *l)
Returns the output from a softmax layer.
void neural_layer_softmax_backward(const struct Layer *l, const struct Net *net, const double *input, double *delta)
Backward propagates a softmax layer.
void neural_layer_softmax_free(const struct Layer *l)
Free memory used by a softmax layer.
char * neural_layer_softmax_json_export(const struct Layer *l, const bool return_weights)
Returns a json formatted string representation of a softmax layer.
struct Layer * neural_layer_softmax_copy(const struct Layer *src)
Initialises and creates a copy of one softmax layer from another.
size_t neural_layer_softmax_load(struct Layer *l, FILE *fp)
Reads a softmax layer from a file.
static struct LayerVtbl const layer_softmax_vtbl
Neural softmax layer implemented functions.
void neural_layer_softmax_print(const struct Layer *l, const bool print_weights)
Prints a softmax layer.
void neural_layer_softmax_init(struct Layer *l, const struct ArgsLayer *args)
Creates and initialises a softmax layer.
size_t neural_layer_softmax_save(const struct Layer *l, FILE *fp)
Writes a softmax layer to a file.
void neural_layer_softmax_forward(const struct Layer *l, const struct Net *net, const double *input)
Forward propagates a softmax layer.
void neural_layer_softmax_update(const struct Layer *l)
Dummy function since a softmax layer has no weights.
void neural_layer_softmax_rand(struct Layer *l)
Dummy function since softmax layers have no weights.
void neural_layer_softmax_resize(struct Layer *l, const struct Layer *prev)
Resizes a softmax layer if the previous layer has changed size.
bool neural_layer_softmax_mutate(struct Layer *l)
Dummy function since a softmax layer cannot be mutated.
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.