What are the input and output channels of a convolution in PyTorch?
in_channels is the number of channels of the input to the convolutional layer. So, for example, in the case of the convolutional layer that applies to the image, in_channels refers to the number of channels of the image. In the case of an RGB image, in_channels == 3 (red, green and blue); in the case of a gray image, in_channels == 1.

out_channels is the number of feature maps, which is often equivalent to the number of kernels that you apply to the input. See e.g. https://stats.stackexchange.com/a/292064/82135 for more info.