I’m working on a siamese-like architecture with triplet loss where the network inputs are a mix of numerical, categorical and textual features. Some of the features like “alternate names” come with multiple values. I’d like to


share my encoder weights so that the same (text) encoder used for single-value fields can be reused for multi-value fields too.


apply the text encoder on each value of a multivalue feature, followed by max pooling for extracting the most relevant signal out of the available values.


what’s the most efficient way to achieve the above?
Thanks