facebookresearch / ParlAI

A framework for training and evaluating AI models on a variety of openly available dialogue datasets.
https://parl.ai
MIT License
10.48k stars 2.1k forks source link

Standardize batchifying image features #2461

Open EricMichaelSmith opened 4 years ago

EricMichaelSmith commented 4 years ago

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.

github-actions[bot] commented 4 years ago

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

stephenroller commented 4 years ago

@EricMichaelSmith this seems done right?

EricMichaelSmith commented 4 years ago

@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

klshuster commented 4 years ago

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