NN architecture (weights, biases) independent of the input size?

Hi everyone, I am new to Pytorch. Is there a way by which I could define the architecture of my network here in a way that it does not get affected by the number of inputs I am having? Eg, in Tensorflow, I can define a network having layers = [1,30,30,30,1]. In the first/input layer having a single unit, I can put in a vector of any size by storing it as a list and then passing it into the network just like a scalar. But, I am not able to implement the same in Pytorch. Any help would be appreciated.