tensorflow/models · error
Not a valid assemblenet_depth:
Error message
Not a valid assemblenet_depth:
What it means
Error "Not a valid assemblenet_depth:" thrown in tensorflow/models.
Source
Thrown at official/projects/assemblenet/modeling/assemblenet_plus.py:657
def assemblenet_plus(assemblenet_depth: int,
num_classes: int,
num_frames: int,
model_structure: List[Any],
input_specs: layers.InputSpec = layers.InputSpec(
shape=[None, None, None, None, 3]),
model_edge_weights: Optional[List[Any]] = None,
use_object_input: bool = False,
attention_mode: Optional[str] = None,
max_pool_predictions: bool = False,
**kwargs):
"""Returns the AssembleNet++ model for a given size and number of output classes."""
data_format = tf_keras.backend.image_data_format()
assert data_format == 'channels_last'
if assemblenet_depth not in asn.ASSEMBLENET_SPECS:
raise ValueError('Not a valid assemblenet_depth:', assemblenet_depth)
if use_object_input:
# assuming input_specs = [vide, obj] when use_object_input = True
input_specs_dict = {'image': input_specs[0], 'object': input_specs[1]}
else:
input_specs_dict = {'image': input_specs}
params = asn.ASSEMBLENET_SPECS[assemblenet_depth]
backbone = AssembleNetPlus(
block_fn=params['block'],
num_blocks=params['num_blocks'],
num_frames=num_frames,
model_structure=model_structure,
input_specs=input_specs,
model_edge_weights=model_edge_weights,
use_object_input=use_object_input,
attention_mode=attention_mode, # pyrefly: ignore[bad-argument-type]
**kwargs)View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/assemblenet/modeling/assemblenet_plus.py:657 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/062103006f68eb3b.
Report an issue: GitHub.