keras-team/keras · error · ValueError
Array inputs to associative_scan must have the same first di
Error message
Array inputs to associative_scan must have the same first dimension. (saw: {}) What it means
Error "Array inputs to associative_scan must have the same first dimension. (saw: {})" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/openvino/core.py:1233
def _unsqueeze(x, axis):
x_ov = get_ov_output(x)
const_axis = ov_opset.constant(axis, Type.i32).output(0)
return OpenVINOKerasTensor(
ov_opset.unsqueeze(x_ov, const_axis).output(0)
)
if reverse:
elems_flat = [_flip(elem, axis) for elem in elems_flat]
def _combine(a_flat, b_flat):
a = tree.pack_sequence_as(elems, a_flat)
b = tree.pack_sequence_as(elems, b_flat)
c = f(a, b)
return tree.flatten(c)
num_elems = int(elems_flat[0].shape[axis])
if not all(int(elem.shape[axis]) == num_elems for elem in elems_flat[1:]):
raise ValueError(
"Array inputs to associative_scan must have the same "
"first dimension. (saw: {})".format(
[elem.shape for elem in elems_flat]
)
)
def _interleave(a, b, axis):
n_a = a.shape[axis]
n_b = b.shape[axis]
a_common = slice_along_axis(a, 0, n_b, axis=axis)
a_exp = _unsqueeze(a_common, axis + 1)
b_exp = _unsqueeze(b, axis + 1)
interleaved = _concat([a_exp, b_exp], axis + 1)
interleaved_ov = get_ov_output(interleaved)
orig_shape = ov_opset.shape_of(interleaved_ov, Type.i32).output(0)
ndim = len(interleaved_ov.get_partial_shape())View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/openvino/core.py:1233 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/67ab9f2b1f51ffec.
Report an issue: GitHub.