tensorflow/models · error · ValueError
min_resize should be larger than crop_size. Got ({min_resize
Error message
min_resize should be larger than crop_size. Got ({min_resize}, {crop_size}). What it means
Error "min_resize should be larger than crop_size. Got ({min_resize}, {crop_size})." thrown in tensorflow/models.
Source
Thrown at official/projects/videoglue/datasets/common/processors.py:152
min_resize: Minimum size of the final image dimensions.
crop_size: Crop size of the final image dimensions.
is_flow: If is flow, will modify the raw values to account for the resize.
For example, if the flow image is resized by a factor k, we need to
multiply the flow values by the same factor k since one pixel displacement
in the resized image corresponds to only 1/k pixel displacement in the
original image.
is_random: Whether perform random crop or central crop.
seed: Random seed.
state: the dictionary contains data processing states.
Returns:
A Tensor of shape [timesteps, output_h, output_w, channels] of type
frames.dtype where min(output_h, output_w) = min_resize.
"""
if is_flow and frames.dtype != tf.float32:
raise ValueError('If is_flow, frames should be given in float32.')
if min_resize < crop_size:
raise ValueError('min_resize should be larger than crop_size. Got '
f'({min_resize}, {crop_size}).')
if is_random:
min_resize = tf.random.uniform((),
minval=min_resize,
maxval=_VGG_EXPANSION_RATIO * min_resize,
dtype=tf.float32)
shape = tf.shape(input=frames)
image_size = tf.cast(shape[1:3], tf.float32)
input_h = image_size[0]
input_w = image_size[1]
scale = tf.cast(min_resize / input_h, tf.float32)
scale = tf.maximum(scale, tf.cast(min_resize / input_w, tf.float32))
scale_h = input_h * scale
scale_w = input_w * scaleView on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/videoglue/datasets/common/processors.py:152 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/270c47f9eb7f0efd.
Report an issue: GitHub.