keras-onnx icon indicating copy to clipboard operation
keras-onnx copied to clipboard

fused batchnorm result in conv

Open pilz22 opened this issue 4 years ago • 1 comments

hello, here I first tried to convert my keras model to onnx format. when I check the nodes in graph,it seems all conv2d and batchnorm are merged in to one node, the optype is 'conv'. and then i have to convert the onnx model to other model type. I want to consult whether and how the merged conv keeps the functions of batchnorm? if it is only a conv, then the batchnorm layer is missed when converted to other model type?

pilz22 avatar Apr 27 '21 13:04 pilz22

We use ConvBatchNormOptimizer in onnxconverter-common to fuse conv+batchnorm, see the line here

jiafatom avatar Apr 28 '21 16:04 jiafatom