I guess you could just use Numpy for that
import numpy as np        

your_file = open('filename', 'ab')
for epoch in range(num_epochs):
    # ...
    np.savetxt(your_tensor.numpy())
your_file.close()