Hello, In my research I have to rewrite the following function to Pytorch. The project involves looping over the layers in the network. Does anyone know how to rewrite the following:
depthwise = DepthWiseConv2d(in_channels = inp.shape[2], out_channels = out.shape[2], kernel_size = kernel, padding=padding, stride=stride, dilation = dilation_rate)
functor = K.function([inp, K.learning_phase()], [depthwise])
depthwise_conv2d_vals = functor([test_ex, 0])[0]