Treat the input channels as batches of 1 channel images
conv = torch.nn.Conv2d(1, out_channels, kernel_size, stride, padding, dilation, groups, bias)
batchsize = x.shape[0]
temp = conv(x.reshape(-1,1,-1,-1)).reshape(3, batchSize, -1, -1, -1)


NOTE : check the reshapes above, if desired output doesent come change -1 in reshapes appropirately. (also be careful about how reshape is performed)