tensorflow/models · error · ValueError
input_path key '%s' does not have a corresponding weight.
Error message
input_path key '%s' does not have a corresponding weight.
What it means
Error "input_path key '%s' does not have a corresponding weight." thrown in tensorflow/models.
Source
Thrown at official/vision/dataloaders/input_reader.py:75
stop_on_empty_dataset = True
if params.weights:
# Combine multiple datasets using weighted sampling.
if (not isinstance(params.input_path, cfg.base_config.Config) or
not isinstance(params.weights, cfg.base_config.Config)):
raise ValueError(
'input_path and weights must both be a Config to use weighted '
'sampling.')
input_paths = params.input_path.as_dict()
weights = params.weights.as_dict()
if len(input_paths) != len(weights):
raise ValueError(
'The number of input_path and weights must be the same, but got %d '
'input_paths and %d weights.' % (len(input_paths), len(weights)))
for k in input_paths.keys():
if k not in weights:
raise ValueError(
'input_path key \'%s\' does not have a corresponding weight.' % k)
return build_weighted_sampling_combine_fn(weights, stop_on_empty_dataset)
return None
def calculate_batch_sizes(total_batch_size: int,
pseudo_label_ratio: float,
pseudo_label_batch_size: int = 0) -> Tuple[int, int]:
"""Calculates labeled and pseudo-labeled dataset batch sizes.
Returns (labeled_batch_size, pseudo_labeled_batch_size) given a
total batch size and pseudo-label data ratio.
Args:
total_batch_size: The total batch size for all data.
pseudo_label_ratio: A float ratio of pseudo-labeled to labeled data in a
batch. If it is negative, use `pseudo_label_batch_size` instead.View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/vision/dataloaders/input_reader.py:75 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/2589445e520bf163.
Report an issue: GitHub.