Skip to content
Snippets Groups Projects
Commit d43726ea authored by Noam Zerah's avatar Noam Zerah
Browse files

new

parent e79d0618
No related branches found
No related tags found
No related merge requests found
Pipeline #68020 failed
...@@ -61,10 +61,9 @@ void clearGraphViewInputNodes(std::shared_ptr<GraphView> graphView,DataType targ ...@@ -61,10 +61,9 @@ void clearGraphViewInputNodes(std::shared_ptr<GraphView> graphView,DataType targ
{ {
for (std::shared_ptr<Aidge::Node> input_node: graphView->inputNodes()) for (std::shared_ptr<Aidge::Node> input_node: graphView->inputNodes())
{ {
for (Aidge::IOIndex_t index = input_node->getFirstFreeDataInput();index < input_node->getNbFreeDataInputs(); index++) auto cast_node = Cast(targetType);
{ cast_node->addChild(input_node);
std::static_pointer_cast<OperatorTensor>(input_node->getOperator())->resetInput(index); graphView->add(cast_node);
}
} }
} }
bool checkArchitecture(std::shared_ptr<GraphView> graphView) bool checkArchitecture(std::shared_ptr<GraphView> graphView)
...@@ -1285,7 +1284,7 @@ void quantizeNetwork(std::shared_ptr<GraphView> graphView, ...@@ -1285,7 +1284,7 @@ void quantizeNetwork(std::shared_ptr<GraphView> graphView,
Log::notice("Starting to cast operators into the desired type ..."); Log::notice("Starting to cast operators into the desired type ...");
castQuantizedGraph(graphView,targetType,singleShift,bitshiftRounding); castQuantizedGraph(graphView,targetType,singleShift,bitshiftRounding);
graphView->updateInputsOutputs(); graphView->updateInputsOutputs();
//clearGraphViewInputNodes(graphView,targetType); //Convert all input tensors of the GV into targetType clearGraphViewInputNodes(graphView,targetType); //Convert all input tensors of the GV into targetType
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment