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

use tf.shape instead of .shape for dynamic axes in InstanceNormalization

Open masakistan opened this issue 4 years ago • 4 comments

InstanceNormalization failed to handle tensor shape with undefined/batch size dimension. This PR fixes it by querying the dynamic shape instead of creating a constant from static shape.

Essentially the same as #543

masakistan avatar Sep 26 '20 07:09 masakistan

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 26 '20 07:09 CLAassistant

@masakistan please add in a dynamic shape testcase for instance_normalization into onnx-tensorflow/test/backend/test_dynamic_shape.py

winnietsang avatar Nov 13 '20 21:11 winnietsang

@masakistan please add in a dynamic shape testcase for instance_normalization into onnx-tensorflow/test/backend/test_dynamic_shape.py

Will do, sorry I haven't had time to get to it.

masakistan avatar Nov 16 '20 01:11 masakistan

@masakistan please add in a dynamic shape testcase for instance_normalization into onnx-tensorflow/test/backend/test_dynamic_shape.py

Hi, I want to convert my onnx file to the tensorflow considering dynamic batch size, but it fails after lots of trial, could you help me I've attached the onnx file here https://drive.google.com/file/d/15m7fXX7Q2M5EMVLxbiqeUktKbjZPdlST/view?usp=sharing

mohamadHN93 avatar Jun 22 '21 10:06 mohamadHN93