src/transformers/models/flava/modeling_flava.py/FlavaForPreTraining/_resize_to_2d
class FlavaForPreTraining:    def _resize_to_2d(self, x: torch.Tensor):
        if x.dim() > 2:
            x = x.view(x.size(0), -1)
        return x