tensorflow/models · error · ValueError
Unrecognized pooling method: %s
Error message
Unrecognized pooling method: %s
What it means
Error "Unrecognized pooling method: %s" thrown in tensorflow/models.
Source
Thrown at official/projects/yt8m/modeling/yt8m_model_utils.py:135
frames = tf.where(
frame_mask,
frames,
tf.ones_like(frames, dtype=frames.dtype)
* _large_compatible_negative(frames.dtype),
)
# Magic to avoid loss NaN when bfloat16 is enabled.
# See yaqs/5377152819545505792 and b/214396297 for more discussion.
reduced = tf.reduce_max(frames, 1) + tf.reduce_mean(frames, 1) * 0
elif method == "swap":
# Note we assume the frames are in the shape of
# [batch_size, num_frames, feature_size]. Otherwise this function might
# fail.
reduced = frame_swap(frames, frame_mask)
elif method == "none":
feature_size = frames.shape.as_list()[2]
reduced = tf.reshape(frames, [-1, feature_size])
else:
raise ValueError("Unrecognized pooling method: %s" % method)
return reduced
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/yt8m/modeling/yt8m_model_utils.py:135 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/58484fe820e28a18.
Report an issue: GitHub.