[numpy] Fix users of NumPy APIs that are removed in NumPy 2.0.

This change migrates users of APIs removed in NumPy 2.0 to their recommended replacements (https://numpy.org/devdocs/numpy_2_0_migration_guide.html).

PiperOrigin-RevId: 655999944
This commit is contained in:
Peter Hawkins 2024-07-25 10:23:32 -07:00 committed by A. Unique TensorFlower
parent a56f33c4c5
commit 80802c248d

View file

@ -359,7 +359,7 @@ def make_weighted_bow_model(
feature_shape = input_dims + output_dims
feature_weights = tf.expand_dims(
tf.reshape(
tf.range(np.product(feature_shape), dtype=tf.float32),
tf.range(np.prod(feature_shape), dtype=tf.float32),
feature_shape,
),
axis=0,