[Feature request]: Improve interfacing between encoders and output heads #265
Labels
code maintenance
Issue/PR for refactors, code clean up, etc.
enhancement
New feature or request
ux
User experience, quality of life changes
Feature/behavior summary
Currently, there are two things that make configuring output heads a bit of a wildcard:
Request attributes
Related issues
No response
Solution description
I don't really have a perfect solution, but my suggestions are:
AbstractPyGModel
), add an abstract property likeencoder_output_dim
or something to that effect, that will make it easier for output heads to be created: it'll essentially just use this to calculate the input dimensions for the output head, and the only configuration the output heads will need is thehidden_dim
and possiblyoutput_dim
.For the second item, it could be something as simple as:
And in the concrete case, it might return the dimension of the final layer, or for more complicated (e.g. concatenated tensors), provide the arithmetic to calculate the expected output. We can then refactor
OutputHead
to rely on this property for the input dimension.Additional notes
No response
The text was updated successfully, but these errors were encountered: