Open talhaanwarch opened 2 years ago
I think this one is correct
train_transform = Compose(
[
ApplyTransformToKey(
key="video",
transform=Compose(
[
UniformTemporalSubsample(num_video_samples),
Permute([1,0,2,3]),#[ C, T, H, W]->#[ T, C, H, W]
ColorJitter(brightness=0.1,contrast=0.1,hue=0,saturation=0),
Permute([1,0,2,3]),
Lambda(lambda x: x / 255.0),
Normalize((0.45, 0.45, 0.45), (0.225, 0.225, 0.225)),
RandomShortSideScale(min_size=256, max_size=320),
RandomCrop(224),
RandomHorizontalFlip(p=0.5),
]
),
),
]
)
I am trying to apply augmentation from torchvision. But i got an error
RuntimeError: number of dims don't match in permute
Here is the codeWithout these permutation lines and ColorJitter the batch shape is
torch.Size([8, 3, 10, 224, 224])
. Here is complete error