So i read through this thread (among many others).

  
    
    
    Transfer Learning Grayscale, Image Size and Activation Function 
  
  
    Hey guys, 
I am trying to do the following but I am new to PyTorch and the tutorial about transfer learning is really a rare special case and I cannot find the information I need in order to apply my problem and setup onto it. 
What I want to do is: 
I have a large dataset and I want to use most of alexnets pretrained weights and finetune. 
What I want to do in steps: 

Remove last FC layer from alexnet and implement my own FC layer with 10 classes but the activation function should be sigmoid.
I…
  


However, I can´t seem to find an answer to my specific problem.  I would like to train vgg16 from scratch with a large number of my own black and white images at sizes other than (224x224) with a total of 15 classes.  I figured out how to change the output class number and change the input channel number to 1 (by simply modifying the original source code which I know is not really how it should be done).  Changing the input image size gives me a size mismatch error.  How should I correctly do this?  Specifically, (1, 512,512) for input layer and 15 classes for output layer.  Note:  I actually want to change the number of channels on the input layer of the vgg network, not fake the grayscale images to have 3 channels.
Thanks in advance!