pyt-team/TopoBenchmarkX

Issue with passing torch module in config

levtelyatnikov opened this issue · 1 comments

While using Hydra config instantiation I have faced the issue that it is not trivial to pass torch modules as an argument, I guess that it is somehow possible to do.

Example:

backbone:
  _target_: topomodelx.nn.hypergraph.allset.AllSet
  in_channels: ${data.num_features}
  hidden_channels: 64
  mlp_activation_layer: torch.nn.ReLU

How to make it possible to pass torch.nn.ReLU? Is it possible?

I think it is through _target_ fields like in these examples: https://catalyst-team.github.io/hydra-slayer/master/pages/examples.html