Hi,
I’m using Google Collab on an Nvidia Tesla P100 with 16gb gpu memory. I used vgg-16 without batch norm. I freezed all layers except the first one, which I use to go from 1 to 3 channels, and the ones from the classifier. Here is a snippet from my code:
assert self.image_size == 224, "ERROR: Wrong image size."

            model = torchvision.models.vgg16(pretrained=True) if self.model_type == 'vgg-16' else torchvision.models.vgg19(pretrained=True)

            if self.input_ch != 3:

                first_conv_layer = [nn.Conv2d(self.input_ch, 3, kernel_size=3, stride=1, padding=1, dilation=1, groups=1, bias=True)]

                first_conv_layer.extend(list(model.features))  

                model.features= nn.Sequential(*first_conv_layer)  

            model.classifier[-1] = nn.Linear(4096, 1000)

            model.classifier.add_module('7', nn.ReLU())

            model.classifier.add_module('8', nn.Dropout(p=0.5, inplace=False))

            model.classifier.add_module('9', nn.Linear(1000, self.output_ch))

            model.classifier.add_module('10', nn.LogSoftmax(dim=1))

            

            for param in model.features[1:].parameters(): # disable grad for trained layers

                param.requires_grad = False

I trained it one the Fashion MNIST dataset, which has num_channels=1, that’s why I use an extra layer at the beginning. I added a nn.LogSoftmax(dim=1) at the last layer because I’m using nn.NLLLoss().
My question is: For 50k images on training and 10k on validation, learning_rate=0.0001, batch_size=64 and Adam optimizer it took about 3.5 hours for 20 epochs. Is that normal?