Browse Source

[FIX] minor fix

pull/5/head
troyyyyy 1 year ago
parent
commit
09063ce02c
4 changed files with 5 additions and 5 deletions
  1. +1
    -1
      docs/Examples/HWF.rst
  2. +1
    -1
      docs/Examples/MNISTAdd.rst
  3. +2
    -2
      examples/hwf/hwf.ipynb
  4. +1
    -1
      examples/mnist_add/mnist_add.ipynb

+ 1
- 1
docs/Examples/HWF.rst View File

@@ -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}")


+ 1
- 1
docs/Examples/MNISTAdd.rst View File

@@ -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)


+ 2
- 2
examples/hwf/hwf.ipynb View File

@@ -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": {


+ 1
- 1
examples/mnist_add/mnist_add.ipynb View File

@@ -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",


Loading…
Cancel
Save