Skip to content
Snippets Groups Projects
Commit ad4b1edb authored by Cyril Moineau's avatar Cyril Moineau Committed by Cyril Moineau
Browse files

Add clearer error message for missing input gradient for FC.

parent 1fef0e2e
No related branches found
No related tags found
1 merge request!610.2.2
Pipeline #45650 failed
...@@ -72,7 +72,10 @@ void Aidge::FCImpl_cpu::backward() ...@@ -72,7 +72,10 @@ void Aidge::FCImpl_cpu::backward()
{ {
const FC_Op& op_ = dynamic_cast<const FC_Op&>(mOp); const FC_Op& op_ = dynamic_cast<const FC_Op&>(mOp);
const auto& fc_grad = op_.getOutput(0)->grad(); const auto& fc_grad = op_.getOutput(0)->grad();
assert(fc_grad && "missing ouput #0 gradient"); AIDGE_ASSERT(fc_grad, "missing ouput #0 gradient");
AIDGE_ASSERT(op_.getInput(0)->grad(), "missing input #0 gradient");
AIDGE_ASSERT(op_.getInput(1)->grad(), "missing input #1 gradient");
AIDGE_ASSERT(op_.getInput(2)->grad(), "missing input #2 gradient");
// Find the correct kernel type // Find the correct kernel type
const Registrar<FCImplBackward_cpu>::registrar_key registrarKey = { const Registrar<FCImplBackward_cpu>::registrar_key registrarKey = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment