Skip to content

Understanding IndexKernel for Hadamard Multitask model #1474

Discussion options

You must be logged in to vote

I think that the documentation for the IndexKernel is still confusing, and since the Hadamard Multi-task notebook is the only example (as far as I know) that tells the user to use this kernel explicitly, but for a specific case (inputs are 1 dimensional and there are only 2 tasks), the code in the example might confuse people. The problem here might be my lack of knowledge though, but please consider this:

The Hadamard Multi-task notebook uses the function torch.full_like to create the index tensors, like this

train_i_task1 = torch.full_like(train_x1, dtype=torch.long, fill_value=0)

which when we have multidimensional inputs creates a tensor that repeats the index in every dimension. If t…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@david-vicente
Comment options

@Balandat
Comment options

@david-vicente
Comment options

@Balandat
Comment options

@david-vicente
Comment options

Comment options

You must be logged in to vote
2 replies
@gpleiss
Comment options

@david-vicente
Comment options

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