PandA-2024.02
|
#include "backprop.h"
Go to the source code of this file.
void add_bias_to_activations | ( | TYPE | biases[nodes_per_layer], |
TYPE | activations[nodes_per_layer], | ||
int | size | ||
) |
Definition at line 24 of file backprop.c.
Referenced by matrix_vector_product_with_bias_input_layer(), matrix_vector_product_with_bias_output_layer(), and matrix_vector_product_with_bias_second_layer().
void backprop | ( | TYPE | weights1[input_dimension *nodes_per_layer], |
TYPE | weights2[nodes_per_layer *nodes_per_layer], | ||
TYPE | weights3[nodes_per_layer *possible_outputs], | ||
TYPE | biases1[nodes_per_layer], | ||
TYPE | biases2[nodes_per_layer], | ||
TYPE | biases3[possible_outputs], | ||
TYPE | training_data[training_sets *input_dimension], | ||
TYPE | training_targets[training_sets *possible_outputs] | ||
) |
Definition at line 239 of file backprop.c.
References bench_args_t::biases1, bench_args_t::biases2, bench_args_t::biases3, get_delta_matrix_weights1(), get_delta_matrix_weights2(), get_delta_matrix_weights3(), get_oracle_activations1(), get_oracle_activations2(), matrix_vector_product_with_bias_input_layer(), matrix_vector_product_with_bias_output_layer(), matrix_vector_product_with_bias_second_layer(), nodes_per_layer, possible_outputs, RELU(), soft_max(), take_difference(), bench_args_t::training_data, training_sets, bench_args_t::training_targets, TYPE, update_weights(), bench_args_t::weights1, bench_args_t::weights2, and bench_args_t::weights3.
Referenced by run_benchmark().
void get_delta_matrix_weights1 | ( | TYPE | delta_weights1[input_dimension *nodes_per_layer], |
TYPE | output_difference[nodes_per_layer], | ||
TYPE | last_activations[input_dimension] | ||
) |
Definition at line 135 of file backprop.c.
References input_dimension, and nodes_per_layer.
Referenced by backprop().
void get_delta_matrix_weights2 | ( | TYPE | delta_weights2[nodes_per_layer *nodes_per_layer], |
TYPE | output_difference[nodes_per_layer], | ||
TYPE | last_activations[nodes_per_layer] | ||
) |
Definition at line 110 of file backprop.c.
References nodes_per_layer.
Referenced by backprop().
void get_delta_matrix_weights3 | ( | TYPE | delta_weights3[nodes_per_layer *possible_outputs], |
TYPE | output_difference[possible_outputs], | ||
TYPE | last_activations[nodes_per_layer] | ||
) |
Definition at line 85 of file backprop.c.
References nodes_per_layer, and possible_outputs.
Referenced by backprop().
void get_oracle_activations1 | ( | TYPE | weights2[nodes_per_layer *nodes_per_layer], |
TYPE | output_differences[nodes_per_layer], | ||
TYPE | oracle_activations[nodes_per_layer], | ||
TYPE | dactivations[nodes_per_layer] | ||
) |
Definition at line 121 of file backprop.c.
References nodes_per_layer, TYPE, and bench_args_t::weights2.
Referenced by backprop().
void get_oracle_activations2 | ( | TYPE | weights3[nodes_per_layer *possible_outputs], |
TYPE | output_differences[possible_outputs], | ||
TYPE | oracle_activations[nodes_per_layer], | ||
TYPE | dactivations[nodes_per_layer] | ||
) |
Definition at line 96 of file backprop.c.
References nodes_per_layer, possible_outputs, TYPE, and bench_args_t::weights3.
Referenced by backprop().
void matrix_vector_product_with_bias_input_layer | ( | TYPE | biases[nodes_per_layer], |
TYPE | weights[input_dimension *nodes_per_layer], | ||
TYPE | activations[nodes_per_layer], | ||
TYPE | input_sample[input_dimension] | ||
) |
Definition at line 33 of file backprop.c.
References add_bias_to_activations(), input_dimension, nodes_per_layer, and TYPE.
Referenced by backprop().
void matrix_vector_product_with_bias_output_layer | ( | TYPE | biases[possible_outputs], |
TYPE | weights[nodes_per_layer *possible_outputs], | ||
TYPE | activations[possible_outputs], | ||
TYPE | input_activations[nodes_per_layer] | ||
) |
Definition at line 61 of file backprop.c.
References add_bias_to_activations(), nodes_per_layer, possible_outputs, and TYPE.
Referenced by backprop().
void matrix_vector_product_with_bias_second_layer | ( | TYPE | biases[nodes_per_layer], |
TYPE | weights[nodes_per_layer *nodes_per_layer], | ||
TYPE | activations[nodes_per_layer], | ||
TYPE | input_activations[nodes_per_layer] | ||
) |
Definition at line 47 of file backprop.c.
References add_bias_to_activations(), nodes_per_layer, and TYPE.
Referenced by backprop().
Definition at line 16 of file backprop.c.
References exp.
Referenced by backprop().
Definition at line 3 of file backprop.c.
References exp, possible_outputs, sum, and TYPE.
Referenced by backprop().
void take_difference | ( | TYPE | net_outputs[possible_outputs], |
TYPE | solutions[possible_outputs], | ||
TYPE | output_difference[possible_outputs], | ||
TYPE | dactivations[possible_outputs] | ||
) |
Definition at line 75 of file backprop.c.
References possible_outputs.
Referenced by backprop().
void update_weights | ( | TYPE | weights1[input_dimension *nodes_per_layer], |
TYPE | weights2[nodes_per_layer *nodes_per_layer], | ||
TYPE | weights3[nodes_per_layer *possible_outputs], | ||
TYPE | d_weights1[input_dimension *nodes_per_layer], | ||
TYPE | d_weights2[nodes_per_layer *nodes_per_layer], | ||
TYPE | d_weights3[nodes_per_layer *possible_outputs], | ||
TYPE | biases1[nodes_per_layer], | ||
TYPE | biases2[nodes_per_layer], | ||
TYPE | biases3[possible_outputs], | ||
TYPE | d_biases1[nodes_per_layer], | ||
TYPE | d_biases2[nodes_per_layer], | ||
TYPE | d_biases3[possible_outputs] | ||
) |
Definition at line 146 of file backprop.c.
References bench_args_t::biases1, bench_args_t::biases2, bench_args_t::biases3, input_dimension, learning_rate, nodes_per_layer, possible_outputs, bench_args_t::weights1, bench_args_t::weights2, and bench_args_t::weights3.
Referenced by backprop().