.view takes the desired shape as the input arguments. E.g. x.view(x.size(0), -1) flattens the tensor while keeping the batch dimension intact.
As the name suggests, you will get a view of the tensor, so that no copy will be performed, but rather just the strides and shape will be charged.