MCPcopy Create free account
hub / github.com/MarcCoru/locationencoder / overwrite_hparams_with_args

Function overwrite_hparams_with_args

train.py:35–49  ·  view source on GitHub ↗
(hparams, args)

Source from the content-addressed store, hash-verified

33
34
35def overwrite_hparams_with_args(hparams, args):
36 # overwrites some hparams if specified in arguments
37 if "legendre_polys" in hparams.keys() and args.legendre_polys is not None:
38 hparams["legendre_polys"] = args.legendre_polys
39 print(f"using legendre-polys={args.legendre_polys}, as specified in args")
40 if "min_radius" in hparams.keys() and args.min_radius is not None:
41 hparams["min_radius"] = args.min_radius
42 print(f"using min-radius={args.min_radius}, as specified in args")
43 if args.harmonics_calculation is not None:
44 hparams["harmonics_calculation"] = args.harmonics_calculation
45 print(f"using harmonics_calculation={args.harmonics_calculation}, as specified in args")
46 if args.max_epochs is not None:
47 hparams["max_epochs"] = args.max_epochs
48 print(f"using max_epochs={args.max_epochs}, as specified in args")
49 return hparams
50
51
52def parse_args():

Callers 1

fitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected