Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserWarning from torchvision/transforms #60

Closed
PhilippKaniuth opened this issue Aug 10, 2022 · 1 comment
Closed

UserWarning from torchvision/transforms #60

PhilippKaniuth opened this issue Aug 10, 2022 · 1 comment

Comments

@PhilippKaniuth
Copy link
Member

OS: macOS 10.14.6 (18G9323) (I know... ask my IT why)

I created and activated a fresh conda env using the environment.yml. I did not install any additional packages.

device = 'cuda' if torch.cuda.is_available() else 'cpu'
batch_size = 68
model_name = 'clip-ViT'
module_name = 'visual'
backend = 'pt'
clip = True
out_path = ...

everything works as expected until I execute

dl = vision.load_dl(root,
                    out_path=out_path,
                    batch_size=batch_size,
                    transforms=model.get_transformations(),
                    backend=backend,
                    file_names=file_names)

Which outputs:

    /Users/kaniuth/Desktop/extractivations/conda_env/lib/python3.8/site-packages/torchvision/transforms/transforms.py:332:
    UserWarning: Argument interpolation should be of type InterpolationMode instead of int. 
    Please, use InterpolationMode enum. warnings.warn(

The pipeline seems to continue normally; I can extract and save activations just fine. I just don't know whether that warning has any consequences on the extracted activations?

That warning did not occur with earlier versions of THINGSvision.

@hahahannes
Copy link
Collaborator

I think thats the cause/solution: aitorzip/PyTorch-CycleGAN#33 (comment)
Which we would need to change here: https://github.com/ViCCo-Group/THINGSvision/blob/master/thingsvision/model_class.py#L380
Seems like it is not influencing much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants