diff --git a/nemo/backends/pytorch/tutorials/toys.py b/nemo/backends/pytorch/tutorials/toys.py index 817658cd4518..c3d9027b180e 100644 --- a/nemo/backends/pytorch/tutorials/toys.py +++ b/nemo/backends/pytorch/tutorials/toys.py @@ -154,9 +154,8 @@ def __init__(self, batch_size, f_name="sin", n=1000, x_lo=-4, x_hi=4): self._n = n self._batch_size = batch_size - self._device = t.device("cuda" if self.placement == DeviceType.GPU else "cpu") - x_data = t.tensor(np.random.uniform(low=x_lo, high=x_hi, size=self._n)).unsqueeze(-1).to(self._device) + x_data = t.tensor(np.random.uniform(low=x_lo, high=x_hi, size=self._n)).unsqueeze(-1) y_data = func(x_data) self._dataset = t_utils.TensorDataset(x_data.float(), y_data.float()) self._data_iterator = t_utils.DataLoader(self._dataset, batch_size=self._batch_size,)