I don’t fully understand the use case.
Would you like to set the size as 0, 1, or 2 or the input values?
The former case would be possible via the factory methods, e.g.: torch.randn(3), while the latter would work via e.g. tensor.fill_(value) or torch.full(...).