mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-10-29 17:57:14 +08:00
♻️ experiment.configs
This commit is contained in:
@ -153,8 +153,7 @@ def main():
|
||||
conf = Configs()
|
||||
experiment.create(name='mnist_latest')
|
||||
experiment.configs(conf, {'optimizer.optimizer': 'Adam',
|
||||
'device.cuda_device': 1},
|
||||
'run')
|
||||
'device.cuda_device': 1})
|
||||
with experiment.start():
|
||||
conf.run()
|
||||
|
||||
|
||||
@ -106,8 +106,7 @@ def main():
|
||||
experiment.configs(conf,
|
||||
{'discriminator': 'cnn',
|
||||
'generator': 'cnn',
|
||||
'label_smoothing': 0.01},
|
||||
'run')
|
||||
'label_smoothing': 0.01})
|
||||
with experiment.start():
|
||||
conf.run()
|
||||
|
||||
|
||||
@ -233,8 +233,7 @@ def main():
|
||||
conf = Configs()
|
||||
experiment.create(name='mnist_gan', comment='test')
|
||||
experiment.configs(conf,
|
||||
{'label_smoothing': 0.01},
|
||||
'run')
|
||||
{'label_smoothing': 0.01})
|
||||
with experiment.start():
|
||||
conf.run()
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ def load_experiment(run_uuid: str, checkpoint: Optional[int] = None):
|
||||
# This experiment is just an evaluation; i.e. nothing is tracked or saved
|
||||
experiment.evaluate()
|
||||
# Initialize configurations
|
||||
experiment.configs(conf, conf_dict, 'run')
|
||||
experiment.configs(conf, conf_dict)
|
||||
# Set models for saving/loading
|
||||
experiment.add_pytorch_models(get_modules(conf))
|
||||
# Specify the experiment to load from
|
||||
|
||||
@ -331,10 +331,7 @@ def main():
|
||||
'transformer.d_model': 256,
|
||||
'transformer.d_ff': 1024,
|
||||
'transformer.n_heads': 8,
|
||||
'transformer.n_layers': 6},
|
||||
# We need to load the function `TrainValidConfigs.run` and
|
||||
# everything that it's dependent on
|
||||
'run')
|
||||
'transformer.n_layers': 6})
|
||||
|
||||
# Set models for saving and loading
|
||||
experiment.add_pytorch_models(get_modules(conf))
|
||||
|
||||
Reference in New Issue
Block a user