references/video_classification/transforms.py
Download source file: transforms.py
import torchimport torch.nn as nnclass ConvertBCHWtoCBHW(nn.Module): """Convert tensor from (B, C, H, W) to (C, B, H, W)""" def forward(self, vid: torch.Tensor) -> torch