{"record":{"id":"58484fe820e28a18","repo":"tensorflow/models","slug":"unrecognized-pooling-method-s","errorCode":null,"errorMessage":"Unrecognized pooling method: %s","messagePattern":"Unrecognized pooling method: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/yt8m/modeling/yt8m_model_utils.py","lineNumber":135,"sourceCode":"      frames = tf.where(\n          frame_mask,\n          frames,\n          tf.ones_like(frames, dtype=frames.dtype)\n          * _large_compatible_negative(frames.dtype),\n      )\n    # Magic to avoid loss NaN when bfloat16 is enabled.\n    # See yaqs/5377152819545505792 and b/214396297 for more discussion.\n    reduced = tf.reduce_max(frames, 1) + tf.reduce_mean(frames, 1) * 0\n  elif method == \"swap\":\n    # Note we assume the frames are in the shape of\n    # [batch_size, num_frames, feature_size]. Otherwise this function might\n    # fail.\n    reduced = frame_swap(frames, frame_mask)\n  elif method == \"none\":\n    feature_size = frames.shape.as_list()[2]\n    reduced = tf.reshape(frames, [-1, feature_size])\n  else:\n    raise ValueError(\"Unrecognized pooling method: %s\" % method)\n\n  return reduced\n","sourceCodeStart":117,"sourceCodeEnd":138,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/yt8m/modeling/yt8m_model_utils.py#L117-L138","documentation":"Raised in frame_pooling when the pooling method string is not one of the supported ones (e.g. 'mean', 'max', ...). It is the dispatch guard of the frame-pooling utility.","triggerScenarios":"Thrown at official/projects/yt8m/modeling/yt8m_model_utils.py:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set method to one of the supported pooling methods ('max', 'swap', etc. per the if/elif chain in frame_pooling)","Check for typos or trailing whitespace in the method string from your config","If you need a new pooling method, extend the elif chain in frame_pooling with a branch for it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}