Save
Trying do make the backward to work
This commit is contained in:
+2
-2
@@ -92,7 +92,7 @@ struct activation_softmax_loss_categorical_crossentropy: loss{
|
||||
* @param y_true Vector of true label of data.
|
||||
*
|
||||
*/
|
||||
bool forward(const panic::tensor::real_matrix& y_pred, const panic::tensor::uint_vector& y_true);
|
||||
bool calculate(const panic::tensor::real_matrix& y_pred, const panic::tensor::uint_vector& y_true) override;
|
||||
|
||||
/**
|
||||
* @brief forward function to calculate losses
|
||||
@@ -103,7 +103,7 @@ struct activation_softmax_loss_categorical_crossentropy: loss{
|
||||
* @Note Overloaded if one-shot endcoded
|
||||
* is used.
|
||||
*/
|
||||
bool forward(const panic::tensor::real_matrix& y_pred, const panic::tensor::real_matrix& y_true);
|
||||
bool calculate(const panic::tensor::real_matrix& y_pred, const panic::tensor::real_matrix& y_true) override;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +73,11 @@ struct loss{
|
||||
*/
|
||||
panic::tensor::real_matrix dinputs;
|
||||
|
||||
/**
|
||||
* @brief Matrix for output of loss function
|
||||
*/
|
||||
panic::tensor::real_matrix outputs;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Default de-constructor
|
||||
|
||||
@@ -92,7 +92,7 @@ struct loss_categorical_crossentropy: loss{
|
||||
*/
|
||||
bool backward(
|
||||
const panic::tensor::real_matrix& dvalues,
|
||||
const panic::tensor::uint_vector& y_true);
|
||||
const panic::tensor::uint_vector& y_true) override;
|
||||
|
||||
/**
|
||||
* @brief backward function to calculate from losses
|
||||
@@ -105,7 +105,7 @@ struct loss_categorical_crossentropy: loss{
|
||||
*/
|
||||
bool backward(
|
||||
const panic::tensor::real_matrix& dvalues,
|
||||
const panic::tensor::real_matrix& y_true);
|
||||
const panic::tensor::real_matrix& y_true) override;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user