{"record":{"id":"28e2cbbed9abf1fe","repo":"tensorflow/models","slug":"random-stride-range-should-be-0-got","errorCode":null,"errorMessage":"Random stride range should be >= 0, got {}","messagePattern":"Random stride range should be >= 0, got (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/dataloaders/video_input.py","lineNumber":98,"sourceCode":"    max_area_ratio: The maximum area range for cropping.\n    random_rotation: Use uniform random rotation augmentation or not.\n    augmenter: Image augmenter to distort each image.\n    seed: A deterministic seed to use when sampling.\n    input_image_format: The format of input image which could be jpeg, png or\n      none for unknown or mixed datasets.\n\n  Returns:\n    Processed frames. Tensor of shape\n      [num_frames * num_test_clips, crop_height, crop_width, num_channels].\n  \"\"\"\n  # Validate parameters.\n  if is_training and num_test_clips != 1:\n    logging.warning(\n        '`num_test_clips` %d is ignored since `is_training` is `True`.',\n        num_test_clips)\n\n  if random_stride_range < 0:\n    raise ValueError('Random stride range should be >= 0, got {}'.format(\n        random_stride_range))\n\n  if input_image_format not in ('jpeg', 'png', 'none'):\n    raise ValueError('Unknown input image format: {}'.format(\n        input_image_format))\n\n  if isinstance(crop_size, int):\n    crop_size = (crop_size, crop_size)\n  crop_height, crop_width = crop_size\n\n  # Temporal sampler.\n  if is_training:\n    if random_stride_range > 0:\n      # Uniformly sample different frame-rates\n      stride = tf.random.uniform(\n          [],\n          tf.maximum(stride - random_stride_range, 1),\n          stride + random_stride_range,","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/dataloaders/video_input.py#L80-L116","documentation":"Error \"Random stride range should be >= 0, got {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/dataloaders/video_input.py:98 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"}