Skip to content

Commit

Permalink
moving torchvision import to inside function
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaKh committed May 30, 2024
1 parent 43fcbe1 commit dd2baec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_aug_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit dd2baec

Please sign in to comment.