"""
- Copyright (c) 2018 Intel Corporation
+ Copyright (c) 2018-2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
limitations under the License.
"""
-import networkx as nx
-
+from mo.graph.graph import Graph
from mo.middle.replacement import MiddleReplacementPattern
from mo.utils.error import Error
enabled = True
replacement_id = "Fused_Batch_Norm_is_training_true_catcher"
+ def run_after(self):
+ from extensions.middle.pass_separator import MiddleStart
+ return [MiddleStart]
+
+ def run_before(self):
+ from extensions.middle.pass_separator import MiddleFinish
+ return [MiddleFinish]
+
def pattern(self):
return dict(
nodes=[
edges=[]
)
- def replace_pattern(self, graph: nx.MultiDiGraph, match: dict):
+ def replace_pattern(self, graph: Graph, match: dict):
raise Error('FusedBatchNorm doesn\'t support is_training=True. Node {}'.format(match['op'].id))