Oh, missed that one! Thanks heaps for pointing out to this! I have corrected the line from self.pre_classifier = nn.Linear(64*4*4, 512) to self.pre_classifier = nn.Linear(64*3*3, 512) and the script started the training process! It is rather slow though, but it works so far. Thanks again!