manicman1999 / StyleGAN2-Tensorflow-2.0

StyleGAN 2 in Tensorflow 2.0
MIT License
486 stars 112 forks source link

bad marshal data (unknown type code) #20

Open jmaldon1 opened 2 years ago

jmaldon1 commented 2 years ago
with open("./Models/gen.json", "r") as json_file:
    model_json = json_file.read()
model = model_from_json(model_json, custom_objects={"Conv2DMod": Conv2DMod})
model.load_weights("./Models/gen_19.h5")

ValueError: bad marshal data (unknown type code)

I get this error when trying to load pretrained model gen.json and genMA.json.

Versions: tensorflow = "2.2.3" tf.keras.__version__ == 2.3.0-tf

Also tried higher version of tensorflow like 2.5.0 and still did not work.