diff --git a/include/aidge/operator/Identity.hpp b/include/aidge/operator/Identity.hpp index 367aa4e2d68fb1095b1e3b3be76f6ab59439e47f..bcbe1c6c69e0a666d7a976558d558f101c5b8fca 100644 --- a/include/aidge/operator/Identity.hpp +++ b/include/aidge/operator/Identity.hpp @@ -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; }