Skip to content

Instantly share code, notes, and snippets.

@yukw777
Created August 27, 2020 15:41
Show Gist options
  • Save yukw777/6cd7d70286226aa050865c224d1d4d87 to your computer and use it in GitHub Desktop.
Save yukw777/6cd7d70286226aa050865c224d1d4d87 to your computer and use it in GitHub Desktop.
Hydra Object Instantiation Example
@hydra.main(config_path="conf", config_name="config")
def main(cfg: DictConfig) -> Trainer:
logger.info(f"Training with the following config:\n{OmegaConf.to_yaml(cfg)}")
network = instantiate(cfg.network, cfg.train)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment