Skip to content
Snippets Groups Projects
Commit 8d3c642e authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Added adapt_fc_params_format() usage

parent ebd2a394
No related branches found
No related tags found
1 merge request!51Improve export
Pipeline #75477 failed
......@@ -54,6 +54,7 @@ def export(export_folder_name: str,
graphview.set_dataformat(aidge_core.dformat.nhwc)
graphview.set_backend(ExportLibCpp._name)
aidge_core.adapt_to_backend(graphview)
aidge_core.adapt_fc_params_format(graphview)
graphview.forward_dims(dims=[inputs_tensor.dims()] if inputs_tensor is not None else [])
scheduler.reset_scheduling()
......
......@@ -55,7 +55,8 @@ class FC(ExportNodeCpp):
class FC_NHWC(FC):
def __init__(self, node, mem_info):
super().__init__(node, mem_info)
self.attributes["nhwc"] = True
if not node.attributes().has_attr("ignore_input_format"):
self.attributes["nhwc"] = True
@ExportLibCpp.register_metaop("QFC",
aidge_core.ImplSpec(
......@@ -91,7 +92,8 @@ class QFC(FC):
class QFC_NHWC(QFC):
def __init__(self, node, mem_info):
super().__init__(node, mem_info)
self.attributes["nhwc"] = True
if not node.attributes().has_attr("ignore_input_format"):
self.attributes["nhwc"] = True
@ExportLibCpp.register_metaop("FCAct",
aidge_core.ImplSpec(
......@@ -126,4 +128,5 @@ class FCAct(QFC):
class FCAct_NHWC(FCAct):
def __init__(self, node, mem_info):
super().__init__(node, mem_info)
self.attributes["nhwc"] = True
if not node.attributes().has_attr("ignore_input_format"):
self.attributes["nhwc"] = True
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