Done with activation softmax backwards
This commit is contained in:
@@ -82,9 +82,35 @@ struct loss_categorical_crossentropy: loss{
|
||||
const panic::tensor::real_matrix& y_pred,
|
||||
const panic::tensor::real_matrix& y_true);
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief backward function to calculate from losses
|
||||
*
|
||||
* @param y_pred Matrix of model predection.
|
||||
* @param y_true Vector of true label of data.
|
||||
*
|
||||
*/
|
||||
bool backward(
|
||||
const panic::tensor::real_matrix& dvalues,
|
||||
const panic::tensor::uint_vector& y_true);
|
||||
|
||||
/**
|
||||
* @brief backward function to calculate from 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 backward(
|
||||
const panic::tensor::real_matrix& dvalues,
|
||||
const panic::tensor::real_matrix& y_true);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace neural_network
|
||||
} // namespace panic
|
||||
|
||||
Reference in New Issue
Block a user