Open mateuszlugowski opened 1 year ago
I also encountered the same error while implementing ELECTRA
in keras. The previous version of TransformerEncoder
was able to save successfully which I found from this notebook written by @abheesht17 , which implements previous version of keras-nlp
. I tried to run the same notebook with the latest version of keras-nlp
and saving of TransformerEncoder in .h5
failed.
The only change I made in the new notebook was rename _self_attention_layernorm
to _self_attention_layer_norm
which is the according to the latest naming in TransformerEncoder. notebook2
Describe the bug
Trying to save a model containing
TransformerEncoder
layer results in an error. This is due to some weights of it having the same exact name, and h5 format is raising aValueError
because of that.To Reproduce