ImageCaptioning.pytorch icon indicating copy to clipboard operation
ImageCaptioning.pytorch copied to clipboard

where in the code did you extract the fake_region, conv_feat, conv_feat_embed from the image?

Open homelifes opened this issue 6 years ago • 4 comments

Hi, In the Adaptive Attention model, your inputs to the forward function are: def forward(self, h_out, fake_region, conv_feat, conv_feat_embed) Where in the code have you extracted those features? In the final core model, it is written opts, however i cannot see any with these names. Waiting for your reply

homelifes avatar Jan 23 '19 17:01 homelifes

https://github.com/ruotianluo/ImageCaptioning.pytorch/blob/master/models/AttModel.py#L362

ruotianluo avatar Jan 23 '19 17:01 ruotianluo

@ruotianluo Thanks for your reply. So is the att_feats extracted from the prepro_feats.py file, which is of size (7,7,2048)? And what about p_att_feats? May you tell me from where we originally get it?

homelifes avatar Jan 24 '19 16:01 homelifes

@ruotianluo can you kindly answer? Thanks

homelifes avatar Jan 28 '19 15:01 homelifes

yes. P_* means projected, it's s function of att_fests, used for speed up.

ruotianluo avatar Jan 28 '19 16:01 ruotianluo