ParlAI icon indicating copy to clipboard operation
ParlAI copied to clipboard

Standardize batchifying image features

Open EricMichaelSmith opened this issue 4 years ago • 4 comments

Currently, ImageSeq2seqAgent and ImagePolyencoderAgent have two separate .batchify_image_features() methods for preparing image features for encoding. The main advantage of ImagePolyencoderAgent's implementation of this method is that the images are packed into a Tensor for data_parallel. It's worth testing whether ImageSeq2seqAgent really requires a separate .batchify_image_features() method now: if not, it should be removed, and ImagePolyencoderAgent.batchify_image_features() should be moved into TorchImageAgent.

EricMichaelSmith avatar Mar 11 '20 16:03 EricMichaelSmith

This issue has not had activity in 30 days. Marking as stale.

github-actions[bot] avatar Jun 02 '20 00:06 github-actions[bot]

@EricMichaelSmith this seems done right?

stephenroller avatar Aug 02 '20 16:08 stephenroller

@stephenroller Hmm there are still two different .batchify_image_features() methods in ImagePolyencoderAgent and ImageSeq2seqAgent, so as far as I know this is still an open issue. @klshuster may be able to speak more on this because he's been refactoring some of this code recently

EricMichaelSmith avatar Aug 03 '20 13:08 EricMichaelSmith

This is still not done, however it seems like it'd be a good change to do

klshuster avatar Aug 03 '20 21:08 klshuster