mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 22:25:01 +00:00
ai: kwargs in from_checkpoint
This commit is contained in:
parent
6bda24d4da
commit
1e682661db
2 changed files with 2 additions and 5 deletions
|
@ -51,10 +51,7 @@ class RainfallWaterContraster(object):
|
|||
}
|
||||
|
||||
@staticmethod
|
||||
def from_checkpoint(filepath_checkpoint, filepath_hyperparams=None):
|
||||
if not filepath_checkpoint:
|
||||
filepath_hyperparams = find_paramsjson(filepath_checkpoint)
|
||||
hyperparams = json.loads(readfile(filepath_hyperparams))
|
||||
def from_checkpoint(filepath_checkpoint, **hyperparams):
|
||||
return RainfallWaterContraster(filepath_checkpoint=filepath_checkpoint, **hyperparams)
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ def run(args):
|
|||
filepath_output = args.output if hasattr(args, "output") and args.output != None else "-"
|
||||
|
||||
|
||||
ai = RainfallWaterContraster.from_checkpoint(args.checkpoint)
|
||||
ai = RainfallWaterContraster.from_checkpoint(args.checkpoint, **json.loads(readfile(args.params)))
|
||||
|
||||
sys.stderr.write(f"\n\n>>> This is TensorFlow {tf.__version__}\n\n\n")
|
||||
|
||||
|
|
Loading…
Reference in a new issue