that would be why. A linear layer only takes an input of that has two dimensions, the batch_size and the input features. Also the your input to the linear layer says their should be 365 input features. So you need to change the input shape and the input values when you define fc