{"record":{"id":"9616d46a1395ef6a","repo":"tensorflow/models","slug":"s-classifier-type-not-supported","errorCode":null,"errorMessage":"%s classifier type not supported.","messagePattern":"(.+?) classifier type not supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/videoglue/modeling/video_classification_model.py","lineNumber":113,"sourceCode":"    inputs = {\n        k: tf_keras.Input(shape=v.shape[1:]) for k, v in input_specs.items()\n    }\n    endpoints = backbone(inputs['image'])\n\n    if classifier_type == 'linear':\n      pool_or_flatten_op = tf_keras.layers.GlobalAveragePooling3D()\n    elif classifier_type == 'pooler':\n      pool_or_flatten_op = lambda x: tf.reshape(  # pylint:disable=g-long-lambda\n          x,\n          [\n              tf.shape(x)[0],\n              tf.shape(x)[1],\n              tf.shape(x)[2] * tf.shape(x)[3],\n              tf.shape(x)[4],\n          ],\n      )\n    else:\n      raise ValueError('%s classifier type not supported.' % classifier_type)\n\n    if aggregate_endpoints:\n      pooled_feats = []\n      for endpoint in endpoints.values():\n        x_pool = pool_or_flatten_op(endpoint)\n        pooled_feats.append(x_pool)\n      x = tf.concat(pooled_feats, axis=1)\n    else:\n      if not require_endpoints:\n        # Use the last endpoint for prediction.\n        x = endpoints[max(endpoints.keys())]\n        x = pool_or_flatten_op(x)\n      else:\n        # Concat all the required endpoints for prediction.\n        outputs = []\n        for name in require_endpoints:\n          x = endpoints[name]\n          x = pool_or_flatten_op(x)","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/videoglue/modeling/video_classification_model.py#L95-L131","documentation":"Error \"%s classifier type not supported.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/videoglue/modeling/video_classification_model.py:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}