title: How can only giving number of channels and no height and width to my convolutional neural network work?
body: <p>Hello I am a bit new to the deep learning community and I have been really fed up with how to feed in data throught a neural network. So I was doing the sentdex pytorch series and I was learning convnets. He was using the cats and dogs dataset of microsoft on kaggle. He had resized the image to 50 by 50 and turned them into grayscale. If you want to see the video to answer my question here it is -
  <a href="https://pythonprogramming.net/convnet-model-deep-learning-neural-network-pytorch/" rel="nofollow noreferrer">https://pythonprogramming.net/convnet-model-deep-learning-neural-network-pytorch/</a></p>
  
  <p>So a few thoughts came in my mind while watching the video. The input he passed is only the colour channel of the image - </p>
  
  <p><a href="https://i.stack.imgur.com/48UOS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/48UOS.png" alt="enter image description here"></a></p>
  
  <p>At once at seeing the input he entered it came in my mind why is he only passing the number of channels which is a grayscale image. When a conv2d takes 3 inputs.
  <a href="https://i.stack.imgur.com/XM2GF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XM2GF.png" alt="enter image description here"></a></p>
  
  <p>And I mean it litterally works. I tried researching a bit but no where I found a  good explaination for the input shape that is being fed in here</p>
  
  <p>So I have 2 thoughts and questions about this - </p>
  
  <ul>
  <li>So does that line mean that the convolutional neural network will
  only take in an image that is grayscale and is of any height and
  width and if so please tell how to limit the dimensions like that to
  make our cnn only accept a input shape of <code>(50, 50, 1)</code>.</li>
  <li>And if not then please explain what does it mean, and how we can make
  it accept any input.</li>
  </ul>