update the data tensor to byte