choderalab / pinot

Probabilistic Inference for NOvel Therapeutics
MIT License
15 stars 2 forks source link

Playing with pytorch modules with nn.moduleList #33

Closed karalets closed 4 years ago

karalets commented 4 years ago

@yuanqing-wang

Please have a look here.

In the folder regression, there is a new file with a class. If you import it and try:

regressor_net = NetClass(, n_input=graph_hidden_features, n_output=[1,1], hidden_dim=[10])

That should create imho a thign that takes graph_hidden_features-sized objects as input, passes them through a 10-d bottleneck and then generates a a list of two 1 dimensional output tensors [ batch_size,1].

Please test if this holds for you.

karalets commented 4 years ago

This is stale by now, we resolved the need for this.

I am leaving it here in case we want to adapt from it as a convenience function to quickly construct networks, but we can also let it go soon.