ai from_checkpoint: bugfix

This commit is contained in:
Starbeamrainbowlabs 2022-09-14 16:49:01 +01:00
parent c9e00ea485
commit decdd434d8
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -52,7 +52,7 @@ class RainfallWaterContraster(object):
@staticmethod
def from_checkpoint(filepath_checkpoint, filepath_hyperparams=None):
if filepath_checkpoint is None:
if not filepath_checkpoint:
filepath_checkpoint = find_paramsjson(filepath_checkpoint)
hyperparams = json.loads(readfile(filepath_hyperparams))
return RainfallWaterContraster(filepath_checkpoint=filepath_checkpoint, **hyperparams)