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

[Rmv] fuseBatchNorm test from core as it needs an implementation

parent 74a582a1
No related branches found
No related tags found
No related merge requests found
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* 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
*
********************************************************************************/
/*
#include <catch2/catch_test_macros.hpp>
#include <set>
//#include "aidge/backend/cpu/operator/BatchNormImpl.hpp"
//#include "aidge/backend/cpu/operator/ConvImpl.hpp"
#include "aidge/operator/Conv.hpp"
#include "aidge/operator/GenericOperator.hpp"
#include "aidge/operator/Producer.hpp"
#include "aidge/graph/OpArgs.hpp"
#include "aidge/operator/BatchNorm.hpp"
#include "aidge/utils/Recipies.hpp"
//#include "aidge/backend/TensorImpl.hpp"
//#include "aidge/backend/cpu.hpp"
//#include "aidge/"
#include <cstddef>
namespace Aidge {
TEST_CASE("[FuseBatchNorm] conv") {
auto g1 = Sequential({
Producer({16, 3, 224, 224}, "dataProvider"),
Conv(3, 32, {3, 3}, "conv1"),
BatchNorm<2>()
});
g1->setDataType(DataType::Float32);
g1->setBackend("cpu");
g1->forwardDims();
// std::set<std::string> availableBackends = Tensor::getAvailableBackends();
// if (availableBackends.find("cpu") != availableBackends.end()){
// g1->setBackend("cpu");
// newTensor->getImpl()->setRawPtr(static_cast<T*>(info.ptr));
// }else{
// printf("Warning : Could not use aidge_cpu backend, verify you have `import aidge_cpu`\n");
// }
fuseBatchNorm(g1);
SECTION("Check resulting nodes") {
// REQUIRE(g1->getNodes().size() == 2);
// REQUIRE(g2->getNode("conv1")->getOperator()->type() == "MaxPooling");
// REQUIRE(g2->getNode("conv1")->getOperator()->getRawOutput(0) == g2->getNode("conv2")->getOperator()->getRawInput(0));
// REQUIRE(g2->getNode("conv2")->getOperator()->type() == "MaxPooling");
// REQUIRE(g2->getNode("conv2")->getOperator()->getRawOutput(0) == g2->getNode("conv3")->getOperator()->getRawInput(0));
// REQUIRE(g2->getNode("conv3")->getOperator()->type() == "MaxPooling");
}
}
}
*/
\ No newline at end of file
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