I have seen code that has like this:
data_predict.extend(train_predict.cpu().data.numpy().tolist())
where data_predict is a List, and train_predict is a Tensor. My understanding is that .data is used to extract the Tensor from a Variable, and that if the object is already a Tensor, there is no purpose for it in this manner. Is that correct? Or is there some reason/difference in having .data as above vs omitting it.
Brian