{"record":{"id":"270c47f9eb7f0efd","repo":"tensorflow/models","slug":"min-resize-should-be-larger-than-crop-size-got","errorCode":null,"errorMessage":"min_resize should be larger than crop_size. Got ({min_resize}, {crop_size}).","messagePattern":"min_resize should be larger than crop_size\\. Got \\((.+?), (.+?)\\)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/videoglue/datasets/common/processors.py","lineNumber":152,"sourceCode":"    min_resize: Minimum size of the final image dimensions.\n    crop_size: Crop size of the final image dimensions.\n    is_flow: If is flow, will modify the raw values to account for the resize.\n      For example, if the flow image is resized by a factor k, we need to\n      multiply the flow values by the same factor k since one pixel displacement\n      in the resized image corresponds to only 1/k pixel displacement in the\n      original image.\n    is_random: Whether perform random crop or central crop.\n    seed: Random seed.\n    state: the dictionary contains data processing states.\n  Returns:\n    A Tensor of shape [timesteps, output_h, output_w, channels] of type\n      frames.dtype where min(output_h, output_w) = min_resize.\n  \"\"\"\n  if is_flow and frames.dtype != tf.float32:\n    raise ValueError('If is_flow, frames should be given in float32.')\n\n  if min_resize < crop_size:\n    raise ValueError('min_resize should be larger than crop_size. Got '\n                     f'({min_resize}, {crop_size}).')\n\n  if is_random:\n    min_resize = tf.random.uniform((),\n                                   minval=min_resize,\n                                   maxval=_VGG_EXPANSION_RATIO * min_resize,\n                                   dtype=tf.float32)\n\n  shape = tf.shape(input=frames)\n  image_size = tf.cast(shape[1:3], tf.float32)\n  input_h = image_size[0]\n  input_w = image_size[1]\n\n  scale = tf.cast(min_resize / input_h, tf.float32)\n  scale = tf.maximum(scale, tf.cast(min_resize / input_w, tf.float32))\n\n  scale_h = input_h * scale\n  scale_w = input_w * scale","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/videoglue/datasets/common/processors.py#L134-L170","documentation":"Error \"min_resize should be larger than crop_size. Got ({min_resize}, {crop_size}).\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/videoglue/datasets/common/processors.py:152 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"}