tensorflow/models · error
norm_activation is ignored.
Error message
norm_activation is ignored.
What it means
Error "norm_activation is ignored." thrown in tensorflow/models.
Source
Thrown at official/projects/movinet/modeling/movinet.py:722
def from_config(cls, config, custom_objects=None):
return cls(**config)
@factory.register_backbone_builder('movinet')
def build_movinet(
input_specs: tf_keras.layers.InputSpec,
backbone_config: hyperparams.Config,
norm_activation_config: hyperparams.Config,
l2_regularizer: tf_keras.regularizers.Regularizer = None) -> tf_keras.Model: # pytype: disable=annotation-type-mismatch # typed-keras
"""Builds MoViNet backbone from a config."""
backbone_type = backbone_config.type
backbone_cfg = backbone_config.get()
if backbone_type != 'movinet':
raise ValueError(f'Inconsistent backbone type {backbone_type}')
if norm_activation_config.activation is not None:
logging.warn('norm_activation is not used in MoViNets, but specified: '
'%s', norm_activation_config.activation)
logging.warn('norm_activation is ignored.')
return Movinet(
model_id=backbone_cfg.model_id,
causal=backbone_cfg.causal,
use_positional_encoding=backbone_cfg.use_positional_encoding,
conv_type=backbone_cfg.conv_type,
se_type=backbone_cfg.se_type,
input_specs=input_specs,
activation=backbone_cfg.activation,
gating_activation=backbone_cfg.gating_activation,
output_states=backbone_cfg.output_states,
use_sync_bn=norm_activation_config.use_sync_bn,
norm_momentum=norm_activation_config.norm_momentum,
norm_epsilon=norm_activation_config.norm_epsilon,
kernel_regularizer=l2_regularizer, # pyrefly: ignore[bad-argument-type]
stochastic_depth_drop_rate=backbone_cfg.stochastic_depth_drop_rate,
use_external_states=backbone_cfg.use_external_states,
average_pooling_type=backbone_cfg.average_pooling_type)View on GitHub (pinned to e006f5f0d5)
Solutions
- Remove the activation field from the norm_activation config when building a MoViNet backbone; MoViNet hardcodes its activation and ignores this setting.
- If a custom activation is required, subclass or modify the MoViNet model definition instead of setting norm_activation_config.activation.
Example fix
# In the backbone config, drop the activation override: norm_activation: norm_momentum: 0.99 norm_epsilon: 0.001 # do not set activation here; MoViNet ignores it
When it happens
Trigger: Thrown at official/projects/movinet/modeling/movinet.py:722 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/430f60a00b684954.
Report an issue: GitHub.