mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 22:25:01 +00:00
dlr eo: set custom_objects when loading model
This commit is contained in:
parent
b5f23e76d1
commit
f70083bea4
1 changed files with 4 additions and 1 deletions
|
@ -156,7 +156,10 @@ if PATH_CHECKPOINT is None:
|
|||
model = DeeplabV3Plus(image_size=IMAGE_SIZE, num_classes=NUM_CLASSES, num_channels=8)
|
||||
summarywriter(model, os.path.join(DIR_OUTPUT, "summary.txt"))
|
||||
else:
|
||||
model = tf.keras.models.load_model(PATH_CHECKPOINT)
|
||||
model = tf.keras.models.load_model(PATH_CHECKPOINT, custom_objects={
|
||||
# Tell Tensorflow about our custom layers so that it can deserialise models that use them
|
||||
"LossCrossEntropyDice": LossCrossEntropyDice
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue