c36bfefbf84ce280195e9589e44aac3ee688b11d,onnx_coreml/_operators_nd.py,,_convert_instancenorm,#Any#Any#Any#Any#,775
Before Change
scale = node.input_tensors[node.inputs[1]]
bias = node.input_tensors[node.inputs[2]]
if node.inputs[0] not in graph.shape_dict :
return err.unsupported_op_configuration(builder, node, graph, "Shape of input unknown")
rank = len(graph.shape_dict[node.inputs[0]])
// ONNX converts B x C tensor into B x C x 1 hence
// Rank 2 BN is mapped to Rank 3 BN
if rank == 3:
// 1D Batch Norm
After Change
scale = node.input_tensors[node.inputs[1]]
bias = node.input_tensors[node.inputs[2]]
rank = builder._get_rank(node.inputs[0])
// ONNX converts B x C tensor into B x C x 1 hence
// Rank 2 BN is mapped to Rank 3 BN
if rank == 3:
// 1D Batch Norm
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: onnx/onnx-coreml
Commit Name: c36bfefbf84ce280195e9589e44aac3ee688b11d
Time: 2019-09-11
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_operators_nd.py
Class Name:
Method Name: _convert_instancenorm
Project Name: onnx/onnx-coreml
Commit Name: c36bfefbf84ce280195e9589e44aac3ee688b11d
Time: 2019-09-11
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_operators_nd.py
Class Name:
Method Name: _add_conv_like_op
Project Name: onnx/onnx-coreml
Commit Name: c36bfefbf84ce280195e9589e44aac3ee688b11d
Time: 2019-09-11
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_operators_nd.py
Class Name:
Method Name: _convert_bn