It seems the tensor cannot be passed to the format directly (a scalar can), so a workaround could be:
', '.join(['{:.25f}'.format(x_) for x_ in x])

However, I think grabbing the numpy array and using np.savetxt 1 might be the better idea.