src/transformers/models/layoutlmv2/modeling_layoutlmv2.py/LayoutLMv2VisualBackbone/forward
class LayoutLMv2VisualBackbone:    def forward(self, images):
        images_input = ((images if torch.is_tensor(images) else images.tensor) - self.pixel_mean) / self.pixel_std
        features = self.backbone(images_input)
        features = features[self.out_feature_key]
        features = self.pool(features).flatten(start_dim=2).transpose(1, 2).contiguous()
        return features