We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! Sorry, i have too many questions bother you....
class LTA(nn.Module): def forward(self, *input): elif type == 'proto_adapt': unseen_protos, seen_y = input[:-1] device = unseen_protos.device before_protos = torch.zeros(len(self.seen_class_protos), self.emb_size).to(device) for i, x in enumerate(self.seen_class_protos): before_protos[i] = self.seen_class_protos[i] # matrix S seen_protos = before_protos[seen_y] # matrix S_i protos = torch.cat([seen_protos, unseen_protos], 0) # matrix R
Why we need before_protos? Can we use torch.select(self.seen_class_protos, seen_y to replace above codes?
The text was updated successfully, but these errors were encountered:
I met some back propagation wrong when indexing/slicing on nn.ParameterList, maybe torch.select can do it~
nn.ParameterList
torch.select
Sorry, something went wrong.
No branches or pull requests
Hi!
Sorry, i have too many questions bother you....
Why we need before_protos? Can we use torch.select(self.seen_class_protos, seen_y to replace above codes?
The text was updated successfully, but these errors were encountered: