Deptwise-separable convolution

I am new to pytorch

I am trying to separate the commented code into deptwise and pointwise convolution,
I want to know if my implementation is correct ?

#nn.Conv2d(1,32,kernel_size=3, stride=1,padding=0),
nn.Conv2d(1,1,kernel_size=3, stride=1,padding=0, groups=1), #deptwise
nn.Conv2d(1,32,kernel_size=1, stride=1,padding=0), #point-wise

EDIT: You seem to only be using one input channel in your depthwise conv, in this case there is no difference between a depthwise convolution and a “regular” convolution.