review query_learn#1
Open
bkj wants to merge 7 commits into
Open
Conversation
bkj
commented
Jan 19, 2021
| model = torch.nn.parallel.DistributedDataParallel(model, device_ids=[args.gpu]) | ||
| model_without_ddp = model.module | ||
| n_parameters = sum(p.numel() for p in model.parameters() if p.requires_grad) | ||
| params = [p for n, p in model_without_ddp.named_parameters() if "backbone" not in n and p.requires_grad] |
Author
There was a problem hiding this comment.
@ezekielbarnett this might be wrong -- in the original they set a different learning rate for "backbone" not in n and "backbone" in n. Your version sets the same LR for both
bkj
commented
Jan 19, 2021
|
|
||
| # embed query | ||
| query_fts, query_pos = self.backbone(query) | ||
|
|
Author
There was a problem hiding this comment.
Don't you have to pool the query somehow? I didn't look closely at their backbone, but I think it returns the full feature map, not the global average pooled version which I'd think we want to use
bkj
commented
Jan 19, 2021
| assert mask is not None | ||
| hs = self.transformer(self.input_proj(src), mask, self.query_embed.weight, pos[-1])[0] | ||
| #hs = self.transformer(self.input_proj(src), mask, self.query_embed.weight, pos[-1])[0] | ||
| hs = self.transformer(self.input_proj(src), mask, query_fts, pos[-1])[0] |
Author
There was a problem hiding this comment.
Looking at this it probably makes more sense to add query_fts to self.query_embed.weight instead of just repeating query_fts. I don't 100% understand what query_embed learns, but I think that's more reasonable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.