Resize the tensor as the given tensor.