Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion onnx_tf/handlers/backend/instance_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _common(cls, node, **kwargs):
beta = tensor_dict[node.inputs[2]]

inputs = tensor_dict[node.inputs[0]]
inputs_shape = inputs.shape
inputs_shape = tf.shape(inputs)
masakistan marked this conversation as resolved.
Show resolved Hide resolved
inputs_rank = inputs.shape.ndims

moments_axes = list(range(inputs_rank))[2:]
Expand Down