The docs are here 2 for a linear layer. Basically a linear layer only takes a shape of (batch_size, input_size) the shape of the variable you are passing it is (batch_size, input_size, 1) which has too many dimensions for your linear layers so it will output an error. Also when you defined the linear layer in your model the input to the layer was 365 which does not match the input shape you are passing it too. Even if you don’t unsqueeze the input to your linear layer and the shape is correct there will still be an error because the two sizes do not match. So you need to change the input of your linear layer to 90 and delete the unsqueeze call so your input only has two dimensions.