rahulvigneswaran / Lottery-Ticket-Hypothesis-in-Pytorch

This repository contains a Pytorch implementation of the paper "The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks" by Jonathan Frankle and Michael Carbin that can be easily adapted to any model/dataset.
321 stars 92 forks source link

Input size for different networks #6

Closed akde closed 3 years ago

akde commented 4 years ago

Thanks for the nice repo!

My question is about input image sizes.

In the repo it is stated that:

IMPORTANT : Make sure the input size, number of classes, number of channels, batch size in your new_model.py matches with the corresponding dataset that you are adding (in this case, it is mnist).

However, in the table it is shown that AlexNet (that accepts inputs of size 256 x 256) is tested with MNIST dataset whose image dimensions are of size 28 x 28. Also I could not find any resize functionality in the code. So how is that dimension mismatch is handled?

One more question: Can I use mobileNet (provided here https://pytorch.org/docs/stable/torchvision/models.html) with the MNIST dataset without any modifications?

Again thanks for the very neat and decent repo.

rahulvigneswaran commented 3 years ago

Hi @akde ,

Sorry for the delayed reply. It is true that am not using any resizing. I just took an AlexNet model that was adapted to MNIST (https://github.com/rahulvigneswaran/Lottery-Ticket-Hypothesis-in-Pytorch/blob/master/archs/mnist/AlexNet.py) by someone online used it directly.

Either modify the MobileNet input to match with MNIST or just find a MobileNet for MNIST Pytorch code online and treat it as any other model.

Hope that helps.