Summary
keras.ops.sort with axis=None is documented to flatten the tensor before sorting, but on TensorFlow eager tensors it raises an error.
Reproduction
import keras
import tensorflow as tf
x = tf.constant([[[1, 4, 3], [9, 7, 6]]], dtype=tf.float32)
print(keras.ops.sort(x, axis=None))
Expected result
The tensor should be flattened and returned in ascending order.
Actual result
An exception is raised:
Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Notes
The same API call with a keras.Input placeholder does not raise this error, so the issue appears specific to eager execution.
Summary
keras.ops.sortwithaxis=Noneis documented to flatten the tensor before sorting, but on TensorFlow eager tensors it raises an error.Reproduction
Expected result
The tensor should be flattened and returned in ascending order.
Actual result
An exception is raised:
Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.Notes
The same API call with a
keras.Inputplaceholder does not raise this error, so the issue appears specific to eager execution.