yingkaisha/keras-unet-collection

"NameError: name 'keras' is not defined" when loading model weights (transunet, swin-unet)

Closed this issue · 1 comments

I've saved the trained model, using "model.save(filepath, save_traces=True)" like in the guide. But when I try to load the model weights using "utils.dummy_loader" I get this error and I've already imported keras. Anybody got a solution for that? Or generally to load models/model weights.

Edit: I solved the load problem using "custom_objects" to import custom layers with load_model.

Hi, thank you for your feedback. The problem is fixed in the new release: pip install keras-unet-collection==0.1.13