-
Notifications
You must be signed in to change notification settings - Fork 431
Description
🐛 Bugs / Unexpected behaviors
Hi everyone I am experiencing an error when importing these libraries for pytorchvideo with python 3.12.1. I have tried using python 3.11.7 version but also received the same error.
Instructions To Reproduce the Issue:
-
Import libraries:
from pytorchvideo.transforms import (ApplyTransformToKey, Normalize, RandomShortSideScale, UniformTemporalSubsample, Permute) -
The exact command(s) you ran:
import libraries as step 1 -
Error log:
ModuleNotFoundError Traceback (most recent call last)
Cell In[6], line 3
1 from pytorchvideo.data import LabeledVideoDataset, Kinetics, make_clip_sampler
----> 3 from pytorchvideo.transforms import (ApplyTransformToKey, Normalize, RandomShortSideScale, UniformTemporalSubsample, Permute)
5 from torchvision.transforms import (Compose, Lambda, RandomCrop, RandomHorizontalFlip, Resize)
7 from torchvision.transforms._transforms_video import (CenterCropVideo, NormalizeVideo)
File c:\Users\pnanurdb\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytorchvideo\transforms_init_.py:3
1 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
----> 3 from .augmix import AugMix # noqa
4 from .mix import CutMix, MixUp, MixVideo # noqa
5 from .rand_augment import RandAugment # noqa
File c:\Users\pnanurdb\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytorchvideo\transforms\augmix.py:6
3 from typing import Any, Dict, Optional
5 import torch
----> 6 from pytorchvideo.transforms.augmentations import (
7 _AUGMENTATION_MAX_LEVEL,
8 AugmentTransform,
9 _decreasing_int_to_arg,
10 _decreasing_to_arg,
11 _increasing_magnitude_to_arg,
12 _increasing_randomly_negate_to_arg,
13 )
...
----> 9 import torchvision.transforms.functional_tensor as F_t
10 from torchvision.transforms.functional import InterpolationMode
13 # Maximum global magnitude used for video augmentation.
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
How do i solved the no module named 'torchvision.transforms.functional_tensor'? I followed the steps in https://pytorchvideo.org/docs/tutorial_torchhub_inference but keep on receiving error when importing libraries.