{"record":{"id":"7031a87a23806f1f","repo":"tensorflow/models","slug":"only-support-num-test-clips-1-for-action-localiz","errorCode":null,"errorMessage":"only support num_test_clips = 1 for action localization task. ","messagePattern":"only support num_test_clips = 1 for action localization task\\. ","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/videoglue/datasets/action_localization.py","lineNumber":105,"sourceCode":"      min_resize: Frames are resized so that `min(height, width)` is\n        `min_resize`.\n      crop_size: Final size of the frame after cropping the resized frames. Both\n        height and width are the same.\n      zero_centering_image: If `True`, frames are normalized to values in\n        [-1, 1]. If `False`, values in [0, 1].\n      color_augmentation: Whether to apply color augmentation on video clips.\n      augmentation_type: The data augmentation style applied on images.\n      augmentation_params: A dictionary of params for data augmentation.\n      num_test_clips: Number of test clips (1 by default). If more than 1, this\n        will sample multiple linearly spaced clips within each video at test\n        time. If 1, then a single clip in the middle of the video is sampled.\n        The clips are aggreagated in the batch dimension.\n      one_hot_label: Whether to return one-hot label.\n      merge_multi_labels: Whether to merge multi_labels.\n      import_detected_bboxes: Whether to parse and return detected boxes.\n    \"\"\"\n    if num_test_clips != 1:\n      raise ValueError('only support num_test_clips = 1 for action '\n                       'localization task. ')\n\n    # Parse keyframe index.\n    self.parser_builder.parse_feature(\n        feature_type=tf.io.FixedLenFeature(1, dtype=tf.int64),\n        feature_name=self._KEYFRAME_INDEX_KEY,\n        output_name='keyframe_index',\n        is_context=True)\n    # Add keyframe boxes.\n    for dim in ['ymin', 'xmin', 'ymax', 'xmax']:\n      utils.add_context_box_dim(\n          parser_builder=self.parser_builder,\n          sampler_builder=self.sampler_builder,\n          preprocessor_builder=self.preprocessor_builder,\n          input_box_dim_name=f'{self._GT_PREFIX}/bbox/{dim}',\n          output_box_dim_name=f'instances_{dim}',\n          num_instances_per_frame=num_instance_per_frame,\n          num_frames=num_frames)   # > 1 to duplicate keyframe boxes to all.","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/videoglue/datasets/action_localization.py#L87-L123","documentation":"Error \"only support num_test_clips = 1 for action localization task. \" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/videoglue/datasets/action_localization.py:105 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"}