What is torch.randn((1, 5))?
I'm confused as to why there are double parantheses instead of just torch.randn(1,5).
Is torch.randn(1,5) the same thing as torch.randn((1,5))?

You should check the definition of this function here.

size (int...) – a sequence of integers defining the shape of the output tensor. Can be a variable number of arguments or a collection like a list or tuple.

&gt;&gt;&gt; import torch
&gt;&gt;&gt; a = torch.randn(1,5)
&gt;&gt;&gt; b = torch.randn((1,5))
&gt;&gt;&gt; a.shape == b.shape
True

Therefore, you can use either a or b since they have the same shape.
