{"record":{"id":"e8b9d4dc5aa17624","repo":"tensorflow/models","slug":"only-no-norm-and-layer-norm-and-supported","errorCode":null,"errorMessage":"Only \"no_norm\" and \"layer_norm\" and supported.","messagePattern":"Only \"no_norm\" and \"layer_norm\" and supported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"official/nlp/modeling/layers/mobile_bert_layers.py","lineNumber":64,"sourceCode":"\n  Args:\n      normalization_type: String. The type of normalization_type, only\n        `no_norm` and `layer_norm` are supported.\n      name: Name for the norm layer.\n\n  Returns:\n    layer norm class.\n  \"\"\"\n  if normalization_type == 'no_norm':\n    layer = NoNorm(name=name)\n  elif normalization_type == 'layer_norm':\n    layer = tf_keras.layers.LayerNormalization(\n        name=name,\n        axis=-1,\n        epsilon=1e-12,\n        dtype=tf.float32)\n  else:\n    raise NotImplementedError('Only \"no_norm\" and \"layer_norm\" and supported.')\n  return layer\n\n\n@tf_keras.utils.register_keras_serializable(package='Text')\nclass MobileBertEmbedding(tf_keras.layers.Layer):\n  \"\"\"Performs an embedding lookup for MobileBERT.\n\n  This layer includes word embedding, token type embedding, position embedding.\n  \"\"\"\n\n  def __init__(self,\n               word_vocab_size,\n               word_embed_size,\n               type_vocab_size,\n               output_embed_size,\n               max_sequence_length=512,\n               normalization_type='no_norm',\n               initializer=tf_keras.initializers.TruncatedNormal(stddev=0.02),","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/nlp/modeling/layers/mobile_bert_layers.py#L46-L82","documentation":"Error \"Only \"no_norm\" and \"layer_norm\" and supported.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/nlp/modeling/layers/mobile_bert_layers.py:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"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"}