From dd2baecce22a1be62139511d6a429ed6f9cc327b Mon Sep 17 00:00:00 2001 From: Mina Khoei Date: Thu, 30 May 2024 11:42:45 +0200 Subject: [PATCH] moving torchvision import to inside function --- test/test_aug_caching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_aug_caching.py b/test/test_aug_caching.py index 8f120db..efb8165 100644 --- a/test/test_aug_caching.py +++ b/test/test_aug_caching.py @@ -2,7 +2,6 @@ import numpy as np from torch.utils.data import Dataset -from torchvision.transforms import Compose from tonic.audio_augmentations import RandomPitchShift from tonic.audio_transforms import AmplitudeScale, FixLength @@ -31,6 +30,8 @@ def __getitem__(self, index): def test_aug_disk_caching(): + from torchvision.transforms import Compose + all_transforms = {} all_transforms["pre_aug"] = [AmplitudeScale(max_amplitude=0.150)] all_transforms["augmentations"] = [RandomPitchShift(samplerate=16000, caching=True)]