tensorflow/models · error · ValueError
filter_size_scale is not greater than zero.
Error message
filter_size_scale is not greater than zero.
What it means
Error "filter_size_scale is not greater than zero." thrown in tensorflow/models.
Source
Thrown at official/vision/modeling/backbones/mobilenet.py:1294
this number.
stochastic_depth_drop_rate: A `float` of drop rate for drop connect layer.
flat_stochastic_depth_drop_rate: A `bool`, indicating that the stochastic
depth drop rate will be fixed and equal to all blocks.
regularize_depthwise: If Ture, apply regularization on depthwise.
use_sync_bn: If True, use synchronized batch normalization.
finegrain_classification_mode: If True, the model will keep the last layer
large even for small multipliers, following
https://arxiv.org/abs/1801.04381.
output_intermediate_endpoints: A `bool` of whether or not output the
intermediate endpoints.
**kwargs: Additional keyword arguments to be passed.
"""
if model_id not in SUPPORTED_SPECS_MAP:
raise ValueError('The MobileNet version {} '
'is not supported'.format(model_id))
if filter_size_scale <= 0:
raise ValueError('filter_size_scale is not greater than zero.')
if output_stride is not None:
if model_id == 'MobileNetV1':
if output_stride not in [8, 16, 32]:
raise ValueError('Only allowed output_stride values are 8, 16, 32.')
else:
if output_stride == 0 or (output_stride > 1 and output_stride % 2):
raise ValueError('Output stride must be None, 1 or a multiple of 2.')
self._model_id = model_id
self._input_specs = input_specs
self._filter_size_scale = filter_size_scale
self._min_depth = min_depth
self._output_stride = output_stride
self._divisible_by = divisible_by
self._stochastic_depth_drop_rate = stochastic_depth_drop_rate
self._flat_stochastic_depth_drop_rate = flat_stochastic_depth_drop_rate
self._regularize_depthwise = regularize_depthwiseView on GitHub (pinned to e006f5f0d5)
Solutions
- Set filter_size_scale to a positive float (e.g. 1.0).
- Remove filter_size_scale from the config to use the default scaling.
When it happens
Trigger: Thrown at official/vision/modeling/backbones/mobilenet.py:1294 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/8e938649b8d97cde.
Report an issue: GitHub.