浏览代码

note about random numbers

rasbt 1 年之前
父节点
当前提交
dc1b1a05b0
共有 1 个文件被更改,包括 31 次插入1 次删除
  1. 31 1
      ch04/01_main-chapter-code/ch04.ipynb

+ 31 - 1
ch04/01_main-chapter-code/ch04.ipynb

@@ -291,6 +291,36 @@
     "print(logits)"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "id": "f8fad0fe-895d-4493-9e48-962e2d46c66f",
+   "metadata": {},
+   "source": [
+    "---\n",
+    "\n",
+    "**Note**\n",
+    "\n",
+    "- If you are running this code on Windows or Linux, the resulting values above may look like as follows:\n",
+    "    \n",
+    "```\n",
+    "Output shape: torch.Size([2, 4, 50257])\n",
+    "tensor([[[-0.9289,  0.2748, -0.7557,  ..., -1.6070,  0.2702, -0.5888],\n",
+    "         [-0.4476,  0.1726,  0.5354,  ..., -0.3932,  1.5285,  0.8557],\n",
+    "         [ 0.5680,  1.6053, -0.2155,  ...,  1.1624,  0.1380,  0.7425],\n",
+    "         [ 0.0447,  2.4787, -0.8843,  ...,  1.3219, -0.0864, -0.5856]],\n",
+    "\n",
+    "        [[-1.5474, -0.0542, -1.0571,  ..., -1.8061, -0.4494, -0.6747],\n",
+    "         [-0.8422,  0.8243, -0.1098,  ..., -0.1434,  0.2079,  1.2046],\n",
+    "         [ 0.1355,  1.1858, -0.1453,  ...,  0.0869, -0.1590,  0.1552],\n",
+    "         [ 0.1666, -0.8138,  0.2307,  ...,  2.5035, -0.3055, -0.3083]]],\n",
+    "       grad_fn=<UnsafeViewBackward0>)\n",
+    "```\n",
+    "\n",
+    "- Since these are just random numbers, this is not a reason for concern, and you can proceed with the remainder of the chapter without issues\n",
+    "\n",
+    "---"
+   ]
+  },
   {
    "cell_type": "markdown",
    "id": "f8332a00-98da-4eb4-b882-922776a89917",
@@ -1509,7 +1539,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.10.10"
+   "version": "3.11.4"
   }
  },
  "nbformat": 4,