{"record":{"id":"430f60a00b684954","repo":"tensorflow/models","slug":"norm-activation-is-ignored","errorCode":null,"errorMessage":"norm_activation is ignored.","messagePattern":"norm_activation is ignored\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"official/projects/movinet/modeling/movinet.py","lineNumber":722,"sourceCode":"  def from_config(cls, config, custom_objects=None):\n    return cls(**config)\n\n\n@factory.register_backbone_builder('movinet')\ndef build_movinet(\n    input_specs: tf_keras.layers.InputSpec,\n    backbone_config: hyperparams.Config,\n    norm_activation_config: hyperparams.Config,\n    l2_regularizer: tf_keras.regularizers.Regularizer = None) -> tf_keras.Model:  # pytype: disable=annotation-type-mismatch  # typed-keras\n  \"\"\"Builds MoViNet backbone from a config.\"\"\"\n  backbone_type = backbone_config.type\n  backbone_cfg = backbone_config.get()\n  if backbone_type != 'movinet':\n    raise ValueError(f'Inconsistent backbone type {backbone_type}')\n  if norm_activation_config.activation is not None:\n    logging.warn('norm_activation is not used in MoViNets, but specified: '\n                 '%s', norm_activation_config.activation)\n    logging.warn('norm_activation is ignored.')\n\n  return Movinet(\n      model_id=backbone_cfg.model_id,\n      causal=backbone_cfg.causal,\n      use_positional_encoding=backbone_cfg.use_positional_encoding,\n      conv_type=backbone_cfg.conv_type,\n      se_type=backbone_cfg.se_type,\n      input_specs=input_specs,\n      activation=backbone_cfg.activation,\n      gating_activation=backbone_cfg.gating_activation,\n      output_states=backbone_cfg.output_states,\n      use_sync_bn=norm_activation_config.use_sync_bn,\n      norm_momentum=norm_activation_config.norm_momentum,\n      norm_epsilon=norm_activation_config.norm_epsilon,\n      kernel_regularizer=l2_regularizer,  # pyrefly: ignore[bad-argument-type]\n      stochastic_depth_drop_rate=backbone_cfg.stochastic_depth_drop_rate,\n      use_external_states=backbone_cfg.use_external_states,\n      average_pooling_type=backbone_cfg.average_pooling_type)","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/movinet/modeling/movinet.py#L704-L740","documentation":"Error \"norm_activation is ignored.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/movinet/modeling/movinet.py:722 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":"# In the backbone config, drop the activation override:\nnorm_activation:\n  norm_momentum: 0.99\n  norm_epsilon: 0.001\n  # do not set activation here; MoViNet ignores it","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}