cryu854 / CUT

"Contrastive Learning for Unpaired Image-to-Image Translation" in TensorFlow 2
31 stars 7 forks source link

Model cannot be saved because the input shapes have not been set #3

Open tportenier opened 2 years ago

tportenier commented 2 years ago

I can train your model and also generate some images periodically. However, when it comes to saving a checkpoint, the code fails with the error message:

ValueError: Model <modules.cut_model.CUT_model object at 0x7f0228263430> cannot be saved because the input shapes have not been set. Usually, input shapes are automatically determined when calling `.fit()` or `.predict()`. To manually set the shapes, call model.build(input_shape)

Note, however, that .fit() is called explicitly in your code. Any ideas on how to debug this?

alexzhangz commented 2 years ago

same question, did you solve this issue?