Softmax + Categorical Crossentropy
I fixed the activation+loss function, you can't select it directly, it automaticly uses it if it can. I also fixed one-hot generator. Still haven't tested the activation + loss nor any other backward function. I'll do that when I get to the optimizers which is next.
This commit is contained in:
@@ -58,30 +58,6 @@ namespace panic{
|
||||
*/
|
||||
struct layer_dense : trainable_layer{
|
||||
|
||||
/**
|
||||
* @brief Emphty matrix to store input data
|
||||
*
|
||||
*/
|
||||
panic::tensor::real_matrix ipnuts;
|
||||
|
||||
/**
|
||||
* @brief Emphty weight matrix to store layer weights
|
||||
*
|
||||
* Weight shape:
|
||||
* input_size x neuron_count
|
||||
*/
|
||||
panic::tensor::real_matrix weights;
|
||||
panic::tensor::real_matrix dweights;
|
||||
|
||||
/**
|
||||
* @brief Emphty bias vector to store layer bias
|
||||
*
|
||||
* Bias shape:
|
||||
* 1 x neuron_count
|
||||
*/
|
||||
panic::tensor::real_vector biases;
|
||||
panic::tensor::real_vector dbiases;
|
||||
|
||||
/**
|
||||
* @brief Empthy constructor
|
||||
*
|
||||
@@ -103,6 +79,16 @@ struct layer_dense : trainable_layer{
|
||||
*/
|
||||
~layer_dense() = default;
|
||||
|
||||
/**
|
||||
* @brief get_type function for layer
|
||||
*
|
||||
* @returns the layer type
|
||||
*
|
||||
*/
|
||||
layer_type get_type() const override {
|
||||
return layer_type::layer_dense;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Forward function for layer
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user