How to convert Conv1d into Conv2d? [PyTorch]
Is it possible with PyTorch to use Conv2d to perform a Conv1d? The question may seem weird, but I need to use a tool that is not compatible with conv1d, but it works with conv2d.

What if I have Conv1d(in,out, kernel_size=3, stride=stride, padding=1, bias=False)?
May unsqueeze help me?

I have the same problem with AvgPool1d (-&gt; AvgPool2d) and MaxPool1d (-&gt; MaxPool2d).

A Conv2D is mostly a generalized version of Conv1D. You can of course use a degenerate version of Conv2D to reproduce a 1D convolution - 
You'll need to add in another dimension to the data: 

data_pnt = data_pnt [..., numpy.newaxis]


You'll also need to specify the kernel size - You'll be choosing a 1D kernel - for example:

Conv2d(in,out, kernel_size=(3,1), &lt;Other Parameters&gt;)

