Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
This repository was archived by the owner on May 1, 2025. It is now read-only.

'tensorflow._api.v1.keras.layers' has no attribute 'LayerNormalization' #62

@manueltonneau

Description

@manueltonneau

Thanks for the great contribution.
I'm following the instructions to fine-tune CTRL on the Moby-Dick dataset and faced this error. Any idea why this could happen? Thanks a lot in advance!

More details on the error here:
Traceback (most recent call last):
File "training.py", line 116, in
transformed = transformer.Encoder()(embedded, training=False)
File "../transformer.py", line 116, in init
setattr(self, "layer%i" % i, EncoderLayer(d_model_size, num_heads, dff, rate))
File "../transformer.py", line 83, in init
self.layernorm1 = tf.keras.layers.LayerNormalization(epsilon=1e-6)
AttributeError: module 'tensorflow._api.v1.keras.layers' has no attribute 'LayerNormalization'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions