Hi,
The first allocates a new tensor in memory and returns it to you. Meaning that the tensor contains whatever the memory was containing before your tensor was allocated.
The second one allocates new memory as well then fills it with randomly generated numbers between 0 and 1.