tensorflow/models · error · NotImplementedError
Only "no_norm" and "layer_norm" are supported.
Error message
Only "no_norm" and "layer_norm" are supported.
What it means
Error "Only "no_norm" and "layer_norm" are supported." thrown in tensorflow/models.
Source
Thrown at official/projects/qat/nlp/modeling/layers/mobile_bert_layers.py:88
Args:
normalization_type: String. The type of normalization_type, only `no_norm`
and `layer_norm` are supported.
name: Name for the norm layer.
Returns:
layer norm class.
"""
if normalization_type == 'no_norm':
layer = NoNormQuantized(name=name)
elif normalization_type == 'layer_norm':
layer = tf_keras.layers.LayerNormalization(
name=name,
axis=-1,
epsilon=1e-12,
dtype=tf.float32)
else:
raise NotImplementedError('Only "no_norm" and "layer_norm" are supported.')
return layer
class MobileBertEmbeddingQuantized(helper.LayerQuantizerHelper,
tf_keras.layers.Layer):
"""Performs an embedding lookup for MobileBERT.
This layer includes word embedding, token type embedding, position embedding.
"""
def __init__(self,
word_vocab_size,
word_embed_size,
type_vocab_size,
output_embed_size,
max_sequence_length=512,
normalization_type='no_norm',
initializer=tf_keras.initializers.TruncatedNormal(stddev=0.02),View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/qat/nlp/modeling/layers/mobile_bert_layers.py:88 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/dd7af1206a24fdb8.
Report an issue: GitHub.