Save
Maybe backward on activation+loss works
This commit is contained in:
+2
-82
@@ -59,19 +59,6 @@ struct activation_softmax_loss_categorical_crossentropy: loss{
|
||||
activation_softmax activation;
|
||||
loss_categorical_crossentropy loss;
|
||||
|
||||
/**
|
||||
* @brief Emphty matrix to store input data for bacward pass
|
||||
*
|
||||
*/
|
||||
panic::tensor::real_matrix dinputs;
|
||||
|
||||
/**
|
||||
* @brief Emphty matrix to store output data
|
||||
*
|
||||
*/
|
||||
panic::tensor::real_matrix outputs;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Empthy constructor
|
||||
@@ -92,7 +79,7 @@ struct activation_softmax_loss_categorical_crossentropy: loss{
|
||||
* @param y_true Vector of true label of data.
|
||||
*
|
||||
*/
|
||||
bool calculate(const panic::tensor::real_matrix& y_pred, const panic::tensor::uint_vector& y_true) override;
|
||||
bool forward(const panic::tensor::real_matrix& y_pred, const panic::tensor::uint_vector& y_true) override;
|
||||
|
||||
/**
|
||||
* @brief forward function to calculate losses
|
||||
@@ -103,74 +90,7 @@ struct activation_softmax_loss_categorical_crossentropy: loss{
|
||||
* @Note Overloaded if one-shot endcoded
|
||||
* is used.
|
||||
*/
|
||||
bool calculate(const panic::tensor::real_matrix& y_pred, const panic::tensor::real_matrix& y_true) override;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief forward function to calculate losses
|
||||
*
|
||||
* @param y_pred Matrix of model predection.
|
||||
* @param y_true Vector of true label of data.
|
||||
*
|
||||
*/
|
||||
bool calculate(const panic::tensor::real_matrix& y_pred, const panic::tensor::uint_vector& y_true);
|
||||
|
||||
/**
|
||||
* @brief forward function to calculate losses
|
||||
*
|
||||
* @param y_pred Matrix of model predection.
|
||||
* @param y_true Vector of true label of data.
|
||||
*
|
||||
* @Note Overloaded if one-shot endcoded
|
||||
* is used.
|
||||
*/
|
||||
bool calculate(const panic::tensor::real_matrix& y_pred, const panic::tensor::real_matrix& y_true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool forward(const panic::tensor::real_matrix& y_pred, const panic::tensor::real_matrix& y_true) override;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user