Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for instantiating objects with hydra #64

Open
Alicegaz opened this issue Jul 7, 2022 · 0 comments
Open

Add support for instantiating objects with hydra #64

Alicegaz opened this issue Jul 7, 2022 · 0 comments

Comments

@Alicegaz
Copy link

Alicegaz commented Jul 7, 2022

Currently, torchok does not support instantiating objects with hydra as here https://hydra.cc/docs/advanced/instantiate_objects/overview/. Two common usages:

  1. I need to provide the object to the layer. For example, generic blocks accept pooling object as parameter. And configuring those objects in the config, with hydra creating an instance of those when passing to the block, is a must.
  2. I simply need to automatically instantiate a class passing the parameters from config, with no need to require user provide model_name and model_params, but just:
model:
   __target__: src.models.backbones.resnet.seresnet18
  pretrained: False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant