for i in range((n-1)//bs + 1): [xb](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor"),[yb](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor") = [train_ds](https://docs.pytorch.org/docs/stable/data.html#torch.utils.data.TensorDataset "torch.utils.data.TensorDataset")[i*bs : i*bs+bs] [pred](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor") = [model](https://docs.pytorch.org/docs/stable/generated/torch.nn.Sequential.html#torch.nn.Sequential "torch.nn.Sequential")([xb](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor"))