keras-team/keras · error · ValueError
`rot90` does not support tensors with dynamic rank for the…
Error message
`rot90` does not support tensors with dynamic rank for the OpenVINO backend.
What it means
Raised by keras.ops.numpy.rot90 in the OpenVINO backend when the input tensor's rank is dynamic (None). Computing the rotation plane and transposes requires a static rank at graph-construction time, so dynamic ranks are rejected.
Solutions
- Pass a tensor with statically known rank
- Rebuild/retrace the graph so the rank is concrete
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at keras/src/backend/openvino/numpy.py:2018 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/232995d40d929790.
Report an issue: GitHub.
Appendix: source
Thrown at keras/src/backend/openvino/numpy.py:2018
def fliplr(x):
return flip(x, axis=1)
def flipud(x):
return flip(x, axis=0)
def rot90(array, k=1, axes=(0, 1)):
"""Rotate an array by 90 degrees in the plane specified by axes."""
array = get_ov_output(array)
if not isinstance(axes, (tuple, list)) or len(axes) != 2:
raise ValueError("axes must be a tuple of length 2")
shape = array.get_partial_shape()
ndim = shape.rank.get_length()
if ndim is None:
raise ValueError(
"`rot90` does not support tensors with dynamic rank "
"for the OpenVINO backend."
)
axis1 = canonicalize_axis(axes[0], ndim)
axis2 = canonicalize_axis(axes[1], ndim)
if axis1 == axis2:
raise ValueError("axes must be different")
k = k % 4
if k == 0:
return OpenVINOKerasTensor(array)
result = array
for _ in range(k):
# 1️ Transpose axis1 <-> axis2View on GitHub (pinned to 7a34a03db6)