c36bfefbf84ce280195e9589e44aac3ee688b11d,onnx_coreml/_operators_nd.py,,_convert_bn,#Any#Any#Any#Any#,294
Before Change
var = node.input_tensors[node.inputs[4]] if node.inputs[4] in node.input_tensors else \
np.ones(shape=channels, dtype=np.float32)
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:
After Change
var = node.input_tensors[node.inputs[4]] if node.inputs[4] in node.input_tensors else \
np.ones(shape=channels, dtype=np.float32)
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: 11
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_bn
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