diff --git a/docs/Examples/HWF.rst b/docs/Examples/HWF.rst index fb03964..86dbc6b 100644 --- a/docs/Examples/HWF.rst +++ b/docs/Examples/HWF.rst @@ -197,7 +197,7 @@ for images. As shown below: .. code:: ipython3 - data_instances = [torch.randn(1, 45, 45).to(device) for _ in range(32)] + data_instances = [torch.randn(1, 45, 45) for _ in range(32)] pred_idx = base_model.predict(X=data_instances) print(f"Predicted class index for a batch of 32 instances: " + f"{type(pred_idx).__name__} with shape {pred_idx.shape}") diff --git a/docs/Examples/MNISTAdd.rst b/docs/Examples/MNISTAdd.rst index cd5f786..bedb86a 100644 --- a/docs/Examples/MNISTAdd.rst +++ b/docs/Examples/MNISTAdd.rst @@ -169,7 +169,7 @@ for images. As shown below: .. code:: ipython3 - data_instances = [torch.randn(1, 28, 28).to(device) for _ in range(32)] + data_instances = [torch.randn(1, 28, 28) for _ in range(32)] pred_idx = base_model.predict(X=data_instances) print(f"Predicted class index for a batch of 32 instances: np.ndarray with shape {pred_idx.shape}") pred_prob = base_model.predict_proba(X=data_instances) diff --git a/examples/hwf/hwf.ipynb b/examples/hwf/hwf.ipynb index 3e9b4d5..5967b21 100644 --- a/examples/hwf/hwf.ipynb +++ b/examples/hwf/hwf.ipynb @@ -193,7 +193,7 @@ "metadata": {}, "outputs": [], "source": [ - "data_instances = [torch.randn(1, 45, 45).to(device) for _ in range(32)]\n", + "data_instances = [torch.randn(1, 45, 45) for _ in range(32)]\n", "pred_idx = base_model.predict(X=data_instances)\n", "print(\n", " f\"Predicted class index for a batch of 32 instances: \"\n", @@ -440,7 +440,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.18" + "version": "3.8.13" }, "orig_nbformat": 4, "vscode": { diff --git a/examples/mnist_add/mnist_add.ipynb b/examples/mnist_add/mnist_add.ipynb index 4202c99..67aee51 100644 --- a/examples/mnist_add/mnist_add.ipynb +++ b/examples/mnist_add/mnist_add.ipynb @@ -226,7 +226,7 @@ } ], "source": [ - "data_instances = [torch.randn(1, 28, 28).to(device) for _ in range(32)]\n", + "data_instances = [torch.randn(1, 28, 28) for _ in range(32)]\n", "pred_idx = base_model.predict(X=data_instances)\n", "print(\n", " f\"Predicted class index for a batch of 32 instances: \"\n",