def extract(node: Node):
        attr = get_mxnet_layer_attrs(node.symbol_dict)
        node_attrs = {
            'epsilon': attr.float('eps', 0.001)
        }

        InstanceNormalization.update_node_stat(node, node_attrs)
        return __class__.enabled
 def extract(node):
     epsilon = onnx_attr(node, 'epsilon', 'f', default=float(1e-5))
     InstanceNormalization.update_node_stat(node, {'epsilon': epsilon})
     return __class__.enabled
Beispiel #3
0
 def test_constructor_supported_attrs(self):
     graph = nx.MultiDiGraph()
     op = InstanceNormalization(graph, attrs={'epsilon': 0.1})
     self.assertEqual(op.supported_attrs(), ['epsilon'])