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

Issue when loading In-Shop Clothes Dataset #11

Closed
stoneyang opened this issue Nov 12, 2019 · 2 comments
Closed

Issue when loading In-Shop Clothes Dataset #11

stoneyang opened this issue Nov 12, 2019 · 2 comments

Comments

@stoneyang
Copy link

stoneyang commented Nov 12, 2019

Hi, @Confusezius ,

Thanks for your excellent code and for sharing it!

When running

python3.6 Standard_Training.py --gpu 0 --savename resnet_inshop_margin_dist  --dataset in-shop --n_epochs 40 --tau 25 --loss marginloss --sampling distance

the following issue raises and I've put the dataset under Datasets directory and the data is fine.

Getting pretrained weights...
Done.
MARGINLOSS Setup for RESNET50 with DISTANCE sampling on IN-SHOP complete with #weights: 23770304
Traceback (most recent call last):
  File "Standard_Training.py", line 161, in <module>
    dataloaders      = data.give_dataloaders(opt.dataset, opt)
  File "/home/code/Deep-Metric-Learning-Baselines/datasets.py", line 50, in give_dataloaders
    datasets = give_InShop_datasets(opt)
  File "/home/code/Deep-Metric-Learning-Baselines/datasets.py", line 280, in give_InShop_datasets
    train_dataset     = BaseTripletDataset(train_image_dict, opt,   samples_per_class=opt.samples_per_class)
  File "/home/code/Deep-Metric-Learning-Baselines/datasets.py", line 398, in __init__
    transforms.RandomHorizontalFlip(0.5)])
TypeError: object() takes no parameters

So, could u shed me some light? Thanks!

@Confusezius
Copy link
Owner

Hi there! Could it be that you are using an older PyTorch/Torchvision version? E.g. what is described here: https://discuss.pytorch.org/t/error-on-transforms-randomhorizontalflip-p-0-5/14724 ?

@stoneyang
Copy link
Author

stoneyang commented Nov 13, 2019

Thanks for your hint! You are my life saver! @Confusezius

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

2 participants