#2461·ParlAI

Standardize batchifying image features

Author: EricMichaelSmithCreated Mar 11, 2020Updated Nov 11, 2022
LabelsHelp WantedSmalldonotreapH2 2020

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`.