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

fix batchnorm and softmax tests

parent 63dc2f7d
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@
using namespace Aidge;
TEST_CASE("[cpu/operator] BatchNorm(forward)", "[BatchNorm][CPU]") {
std::shared_ptr<Node> myBatchNorm = BatchNorm<2>(0.00001F, 0.1F, "mybatchnorm");
std::shared_ptr<Node> myBatchNorm = BatchNorm<2>(3, 0.00001F, 0.1F, "mybatchnorm");
auto op = std::static_pointer_cast<OperatorTensor>(myBatchNorm -> getOperator());
std::shared_ptr<Tensor> myWeights = std::make_shared<Tensor>(Array1D<float,3> {{0.9044, 0.3028, 0.0218}});
std::shared_ptr<Tensor> myBias = std::make_shared<Tensor>(Array1D<float,3> {{0.1332, 0.7503, 0.0878}});
......
......@@ -39,7 +39,7 @@ TEST_CASE("[cpu/operator] Softmax(forward)", "[Softmax][CPU]") {
}
});
std::shared_ptr<Node> mySoftmax = Softmax();
std::shared_ptr<Node> mySoftmax = Softmax(1);
auto op = std::static_pointer_cast<OperatorTensor>(mySoftmax -> getOperator());
mySoftmax->getOperator()->associateInput(0,input);
mySoftmax->getOperator()->setDataType(DataType::Float32);
......@@ -108,7 +108,7 @@ TEST_CASE("[cpu/operator] Softmax(forward)", "[Softmax][CPU]") {
}
});
std::shared_ptr<Node> mySoftmax = Softmax();
std::shared_ptr<Node> mySoftmax = Softmax(1);
auto op = std::static_pointer_cast<OperatorTensor>(mySoftmax -> getOperator());
mySoftmax->getOperator()->associateInput(0,input);
mySoftmax->getOperator()->setDataType(DataType::Float32);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment