Skip to content
Snippets Groups Projects

Fuse bn

Merged Cyril Moineau requested to merge fuseBN into main
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -56,13 +56,13 @@ void Aidge::fuseMulAdd(std::set<std::shared_ptr<Node>> nodes){
// Step 2 : Branch existing producers & create the others
// link weights & bias
if (matmul->getParents(1)==nullptr) {
matmul->getParents(0)->addChild(fc, 0, 1);
if (matmul->getParent(1)==nullptr) {
matmul->getParent(0)->addChild(fc, 0, 1);
printf("Matmul out[1] == nullptr !\n");
} else {
printf("Matmul out[1] != nullptr !\n");
if (matmul->getParents(0)!=nullptr)
matmul->getParents(0)->addChild(fc, 0, 0);
if (matmul->getParent(0)!=nullptr)
matmul->getParent(0)->addChild(fc, 0, 0);
matmul->input(1).first->addChild(fc, 0, 1);
}
(producer_add_bias.first)->addChild(fc,0,2);
Loading