Your model works fine for the mentioned input shape, if layer=1 is used:
model = Network(layer=1, hid=16)
x = torch.randn(2592100, 2)
out = model(x)
print(out.shape)
> torch.Size([2592100, 2])

model = Network(layer=0, hid=16)
x = torch.randn(2592100, 1)
out = model(x)
print(out.shape)
> torch.Size([2592100, 2])

The self.long block expects a single input feature, so an input in the shape [batch_size, 1] would also work.
Since your input has only two dimensions, x.view(x.size(0), -1) won’t change the shape and you could remove it.