tensorflow/models · error · ValueError
only support num_test_clips = 1 for action localization task
Error message
only support num_test_clips = 1 for action localization task.
What it means
Error "only support num_test_clips = 1 for action localization task. " thrown in tensorflow/models.
Source
Thrown at official/projects/videoglue/datasets/action_localization.py:105
min_resize: Frames are resized so that `min(height, width)` is
`min_resize`.
crop_size: Final size of the frame after cropping the resized frames. Both
height and width are the same.
zero_centering_image: If `True`, frames are normalized to values in
[-1, 1]. If `False`, values in [0, 1].
color_augmentation: Whether to apply color augmentation on video clips.
augmentation_type: The data augmentation style applied on images.
augmentation_params: A dictionary of params for data augmentation.
num_test_clips: Number of test clips (1 by default). If more than 1, this
will sample multiple linearly spaced clips within each video at test
time. If 1, then a single clip in the middle of the video is sampled.
The clips are aggreagated in the batch dimension.
one_hot_label: Whether to return one-hot label.
merge_multi_labels: Whether to merge multi_labels.
import_detected_bboxes: Whether to parse and return detected boxes.
"""
if num_test_clips != 1:
raise ValueError('only support num_test_clips = 1 for action '
'localization task. ')
# Parse keyframe index.
self.parser_builder.parse_feature(
feature_type=tf.io.FixedLenFeature(1, dtype=tf.int64),
feature_name=self._KEYFRAME_INDEX_KEY,
output_name='keyframe_index',
is_context=True)
# Add keyframe boxes.
for dim in ['ymin', 'xmin', 'ymax', 'xmax']:
utils.add_context_box_dim(
parser_builder=self.parser_builder,
sampler_builder=self.sampler_builder,
preprocessor_builder=self.preprocessor_builder,
input_box_dim_name=f'{self._GT_PREFIX}/bbox/{dim}',
output_box_dim_name=f'instances_{dim}',
num_instances_per_frame=num_instance_per_frame,
num_frames=num_frames) # > 1 to duplicate keyframe boxes to all.View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/videoglue/datasets/action_localization.py:105 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/7031a87a23806f1f.
Report an issue: GitHub.