Done with activation softmax backwards
This commit is contained in:
@@ -58,6 +58,12 @@ namespace panic{
|
||||
*/
|
||||
struct layer_dense : public layer{
|
||||
|
||||
/**
|
||||
* @brief Emphty matrix to store input data
|
||||
*
|
||||
*/
|
||||
panic::tensor::real_matrix ipnuts;
|
||||
|
||||
/**
|
||||
* @brief Emphty weight matrix to store layer weights
|
||||
*
|
||||
@@ -65,6 +71,7 @@ struct layer_dense : public layer{
|
||||
* input_size x neuron_count
|
||||
*/
|
||||
panic::tensor::real_matrix weights;
|
||||
panic::tensor::real_matrix dweights;
|
||||
|
||||
/**
|
||||
* @brief Emphty bias vector to store layer bias
|
||||
@@ -73,6 +80,7 @@ struct layer_dense : public layer{
|
||||
* 1 x neuron_count
|
||||
*/
|
||||
panic::tensor::real_vector biases;
|
||||
panic::tensor::real_vector dbiases;
|
||||
|
||||
/**
|
||||
* @brief Empthy constructor
|
||||
@@ -102,7 +110,7 @@ struct layer_dense : public layer{
|
||||
*
|
||||
* @Note Calculates -> outputs = inputs * weights + biases
|
||||
*/
|
||||
bool forward(const panic::tensor::real_matrix& inputs);
|
||||
bool forward(const panic::tensor::real_matrix& input_data);
|
||||
|
||||
/**
|
||||
* @brief Backward function for layer
|
||||
@@ -111,7 +119,7 @@ struct layer_dense : public layer{
|
||||
*
|
||||
* @Note Calculates derivative of forward function.
|
||||
*/
|
||||
bool backward(const panic::tensor::real_matrix& dinpus);
|
||||
bool backward(const panic::tensor::real_matrix& dvalues);
|
||||
};
|
||||
|
||||
} // namespace tensor
|
||||
|
||||
Reference in New Issue
Block a user