@ SiQube I have below neural network in Theano library, and want to find its equivalent neural network in PyTorch.
l_in = lasagne.layers.InputLayer(
        shape=(None, 1, input_height, input_width),
    )

    l_hid = lasagne.layers.DenseLayer(
        l_in,
        num_units=20,
        # nonlinearity=lasagne.nonlinearities.tanh,
        nonlinearity=lasagne.nonlinearities.rectify,
        # W=lasagne.init.Normal(.0201),
        W=lasagne.init.Normal(.01),
        b=lasagne.init.Constant(0)
    )

    l_out = lasagne.layers.DenseLayer(
        l_hid,
        num_units=output_length,
        nonlinearity=lasagne.nonlinearities.softmax,
        # W=lasagne.init.Normal(.0001),
        W=lasagne.init.Normal(.01),
        b=lasagne.init.Constant(0)
    )

I just want to know how covet l_in layer to PyTorch layer and pass it to L-hid.
I wrote below code which is not completed but it could clarify what I need.
 def __init__(self, input_height, input_width, output_length):
        super(Net, self).__init__()

        **self.fc1 = nn.Linear(input_height * input_width, 20)**  (this  layer must be change and become sutable for 4D tensor)
        self.fc1.weight.data.fill_(torch.nn.init.normal_(.01))
        self.fc1.bias.data.fill_(torch.nn.init.constant(0))
        self.fc2 = nn.Linear(20, output_length)
        self.fc2.weight.data.fill_(torch.nn.init.normal_(.01))
        self.fc2.bias.data.fill_(torch.nn.init.constant(0))

    def forward(self, x):
        x = F.relu(self.fc1(x))
        x = F.softmax(self.fc2(x))
        return x