diff --git a/include/aidge/operator/ILayerNorm.hpp b/include/aidge/operator/ILayerNorm.hpp index 97f9ce33e197c28edec10e44ac15c1aa899ee909..9eec045922643d9e0d1ae80e66e8ab61436b3abd 100644 --- a/include/aidge/operator/ILayerNorm.hpp +++ b/include/aidge/operator/ILayerNorm.hpp @@ -1,11 +1,13 @@ /******************************************************************************** - * Copyright (c) 2023 CEA-List + * Copyright (c) 2024 Thales * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 + * Author: Lucas RAKOTOARIVONY, Thales Research & Technology France + * Date: 10.09.2024 * ********************************************************************************/ diff --git a/include/aidge/operator/ShiftGELU.hpp b/include/aidge/operator/ShiftGELU.hpp index 41fcedf9683bba596e4cbce4ac75cadfb1399adf..e85ecfd5090eecd8f5d9f9bd13dcf0e4b2cfcd1f 100644 --- a/include/aidge/operator/ShiftGELU.hpp +++ b/include/aidge/operator/ShiftGELU.hpp @@ -1,11 +1,13 @@ /******************************************************************************** - * Copyright (c) 2023 CEA-List + * Copyright (c) 2024 Thales * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 + * Author: Lucas RAKOTOARIVONY, Thales Research & Technology France + * Date: 10.09.2024 * ********************************************************************************/ diff --git a/include/aidge/operator/ShiftMax.hpp b/include/aidge/operator/ShiftMax.hpp index 876984407ee661afd1943b02c2e018020826f569..7a68f4799cdf00c280fb9f4e2874e2c9589da79c 100644 --- a/include/aidge/operator/ShiftMax.hpp +++ b/include/aidge/operator/ShiftMax.hpp @@ -1,11 +1,13 @@ /******************************************************************************** - * Copyright (c) 2023 CEA-List + * Copyright (c) 2024 Thales * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 + * Author: Lucas RAKOTOARIVONY, Thales Research & Technology France + * Date: 10.09.2024 * ********************************************************************************/ diff --git a/src/operator/ILayerNorm.cpp b/src/operator/ILayerNorm.cpp index 7c266135c5821a97f8385dec5d46ed45919055be..dafe7ed0fcea7164c085c1f1d2913a7f461be12f 100644 --- a/src/operator/ILayerNorm.cpp +++ b/src/operator/ILayerNorm.cpp @@ -1,11 +1,13 @@ /******************************************************************************** - * Copyright (c) 2023 CEA-List + * Copyright (c) 2024 Thales * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 + * Author: Lucas RAKOTOARIVONY, Thales Research & Technology France + * Date: 10.09.2024 * ********************************************************************************/ @@ -22,11 +24,6 @@ const std::string Aidge::ILayerNorm_Op::Type = "ILayerNorm"; void Aidge::ILayerNorm_Op::associateInput(const Aidge::IOIndex_t inputIdx, const std::shared_ptr<Aidge::Data>& data) { AIDGE_ASSERT(inputIdx < 3, "Operators {} supports only {} inputs", type(), nbInputs()); AIDGE_ASSERT(data->type() == Tensor::Type, "input data must be of Tensor type"); - // TODO: FIXME: check this, because data dims may not be initialized at this point... - //if (inputIdx == 2) { - // assert(std::dynamic_pointer_cast<Tensor>(data)->size() == ((this->template getAttr<FCAttr::NoBias>()) == false ? static_cast<std::size_t>(this->template getAttr<FCAttr::OutChannels>()) : 0)); - // assert(std::dynamic_pointer_cast<Tensor>(data)->nbDims() == 1); - //} mInputs[inputIdx] = std::dynamic_pointer_cast<Tensor>(data); if (inputIdx == 0 && getInput(0)->nbDims() == 1) mInputs[inputIdx]->resize({1, getInput(inputIdx)->size()}); @@ -37,8 +34,6 @@ bool Aidge::ILayerNorm_Op::forwardDims(bool /*allowDataDependency*/) { const DimSize_t nbFeatures = getInput(0)->dims()[1]; for (std::size_t i = 0; i < nbInputs(); ++i) { if(inputCategory(i) == InputCategory::Param && getInput(i)->size() != nbFeatures) { - // /!\ Input size should be handled BEFORE calling this function - // This should raise an error getInput(i)->resize({getInput(0)->dims()[1]}); } }