Store the data in a binary format via torch.save to keep the full precision.
If you really want to write the data to a text file, format the string. Something like '{:.25f}'.format(tensor) might work (assuming you don’t have values really close to zero).