Is there an function in PyTorch for converting convolutions to fully-connected networks form?
07:09 21 Jun 2019

I'm trying to convert a convolution layer to a fully-connected layer.

For example, there is an example of 3×3 input and 2x2 kernel:

input and kernel

which is equivalent to a vector-matrix multiplication,

vector-matrix multiplication

Is there a function in PyTorch to get the matrix B?

neural-network conv-neural-network pytorch