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

Hello,I have some question about the dataset COCO #7

Open
Mahiro2211 opened this issue Jun 6, 2023 · 1 comment
Open

Hello,I have some question about the dataset COCO #7

Mahiro2211 opened this issue Jun 6, 2023 · 1 comment

Comments

@Mahiro2211
Copy link

Thanks for sharing the code, but When I followed the instruction and got ready to test it on COCO I met some error

RuntimeError: stack expects each tensor to be equal size, but got [3, 297, 224] at entry 0 and [3, 224, 335] at entry 1

At first, I think the question was about the transform

'coco': [
                    transforms.Resize(resize),
                    transforms.RandomCrop(crop),
                    transforms.RandomHorizontalFlip()
                ]

but I tried several times to change the transform, still wrong, would you please do me a favor?

@Mahiro2211
Copy link
Author

I found that if I deal with the coco dataset with the same method of dealing with nuswide , It works very well
I changed the config

'dataset_kwargs': {
        'resize': 256 if args.ds in ['nuswide' ,'coco'] else 224,
        'crop': 224,
        'norm': 2,
        'evaluation_protocol': 1,  # only affect cifar10
        'reset': False,
        'separate_multiclass': False,
    },
    ```

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

1 participant