I fix this issue by adding the code : if "embedding_matrix"] in dict_attr: in the file train.py (see below) :
def __getstate__(self):
"""Method called before serialization for a specific treatment to save
model weight and structure instead of standard serialization."""
dict_attr = dict(self.__dict__)
if "model" in dict_attr:
del dict_attr["model"]
if "embedding_matrix"] in dict_attr:
del dict_attr["embedding_matrix"]
del dict_attr["pretrained_embedding"]
return dict_attr
I have an issue when saving the Bert Model with the code below :
I fix this issue by adding the code : if "embedding_matrix"] in dict_attr: in the file train.py (see below) :
Test Configuration: