Get the input channels for the conv2d from previous layer?

Yes, you can directly access this property via:

self.conv1.out_channels

For your code snippet, this should work:

self.conv1 = nn.Conv2D(in_channels,num_features)
self.conv2 = nn.Conv2D(self.conv1.out_channels,out_ch2)