Skip to content
Snippets Groups Projects
Commit b7d44ec2 authored by Maxence Naud's avatar Maxence Naud
Browse files

fix identity_op dimension management

parent 1ca06bd3
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@
namespace Aidge {
/**
* @brief Indentity_Op is an helper operator made to ease the declaration of MetaNodes.
* This Operator has no Implementation, it just forward its input Tensor.
......@@ -63,7 +65,7 @@ public:
return std::make_shared<Identity_Op>(*this);
}
bool forwardDims(bool /*allowDataDependency*/ = false) override final { return true; } // Do nothing
// bool forwardDims(bool /*allowDataDependency*/ = false) override final { return true; } // Do nothing
/**
* @brief Check if output dimensions have been computed.
......@@ -74,7 +76,7 @@ public:
* @return false Input has no dimensions or is a nullptr.
*/
bool dimsForwarded() const override final {
return mInputs[0] ? !mInputs[0]->empty() : false;
return mInputs[0] ? (mInputs[0]->empty() ? false : mInputs[0]->dims() == mOutputs[0]->dims()) : false;
}
......
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