Hi,
I have been constructing a model that utilizes both squeezenet and tencrop. However when I attempt to train on it I find that I get the error: "
~/anaconda2/envs/pytorch/lib/python3.6/site-packages/torchvision-0.2.0-py3.6.egg/torchvision/models/squeezenet.py in forward(self, x)
     99         x = self.features(x)
    100         x = self.classifier(x)
--> 101         return x.view(x.size(0), self.num_classes)
    102
    103

RuntimeError: invalid argument 2: size '[10 x 14]' is invalid for input with 931840 elements at /Users/soumith/minicondabuild3/conda-bld/pytorch_1512381214802/work/torch/lib/TH/THStorage.c:41

My code is pretty basic and looks something like this
model = torchvision.models.squeezenet.squeezenet1_1()
model.num_classes = 14
model.classifier = nn.Sequential(nn.Linear(13, 14))
train_dataset = DataLoader(ImageFolder('/path/to/data', 
    transform=transforms.Compose([transforms.TenCrop(224), transforms.Lambda(lambda crops: torch.stack([transforms.ToTensor()(crop) for crop in crops]))])
))
for i, (input, target) in train_dataset:
    bs, ncrops, c, h, w = input.size()
    result = model(input.view(-1, c, h, w))

But then of course when I run this code I get my error. I’m not quite sure if this is a problem on my end or if I just can’t implement TenCrop with SqueezeNet.