Skip to content
Discussion options

You must be logged in to vote

What exactly do you mean by "a separate custom mean for each dimension"? The mean function (in the standard, non-multi-task setting) is a scalar function. Do you want to just combine those functions together in some pre-defined way, say additively?

I don't think there is anything pre-canned, but you should be able to just define a custom mean that picks out the right dimensions?

class ComboMean(Mean):

    def __init__(self, input_size, batch_shape=torch.Size(), pre_trained_network, lin_weights):
        super().__init__()
        self.pre_trained_network = pre_trained_network
        self.register_parameter("lin_weights", parameter=torch.nn.Parameter(torch.randn(*batch_shape, input_size,…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ghutchis
Comment options

@Balandat
Comment options

@ghutchis
Comment options

Answer selected by ghutchis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants