tensorflow/models · error

norm_activation is not used in MoViNets, but specified: %s

Error message

norm_activation is not used in MoViNets, but specified: %s

What it means

Error "norm_activation is not used in MoViNets, but specified: %s" thrown in tensorflow/models.

Source

Thrown at official/projects/movinet/modeling/movinet.py:720

  @classmethod
  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,

View on GitHub (pinned to e006f5f0d5)

Solutions

  1. Remove norm_activation from the MoViNet config; it is ignored for this model.
  2. Set norm_activation to None to silence the warning.

When it happens

Trigger: Thrown at official/projects/movinet/modeling/movinet.py:720 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/8bc2272950bde2e2. Report an issue: GitHub.