donnyyou / torchcv

TorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision
https://pytorchcv.com
Apache License 2.0
2.25k stars 378 forks source link

AttributeError: 'RandomSampler' object has no attribute 'num_samples' #167

Open Derrick-Gilchrist opened 3 years ago

Derrick-Gilchrist commented 3 years ago

data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(arch, size), bs=batch_size) try: learn = ConvLearner.pretrained(arch, data, precompute=True)
except: learn = ConvLearner.pretrained(arch, data, precompute=True)

This was the code. Could anyone help me to address this issue!