diff --git a/Untitled.ipynb b/tf_sheet.ipynb similarity index 66% rename from Untitled.ipynb rename to tf_sheet.ipynb index 7cfd947..2909d14 100644 --- a/Untitled.ipynb +++ b/tf_sheet.ipynb @@ -4,17 +4,56 @@ "cell_type": "code", "execution_count": 1, "id": "02d39a02-17f2-4307-8d41-6903c289e9d2", + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:26:44.051696Z", + "start_time": "2024-12-29T19:26:42.404515Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Eager Execution Enabled: True\n", + "Available Devices:\n", + "PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')\n", + "PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')\n" + ] + } + ], + "source": [ + "import tensorflow as tf\n", + "\n", + "from tensorflow.python.framework.ops import EagerTensor\n", + "print(\"Eager Execution Enabled:\", tf.executing_eagerly())\n", + "print(\"Available Devices:\")\n", + "for device in tf.config.list_physical_devices():\n", + " print(device)\n", + "\n", + "tf.debugging.set_log_device_placement(False)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "5a948f66-bc82-4e98-bb2c-d4e6a5d6c353", "metadata": {}, "outputs": [], "source": [ - "import tensorflow as tf" + "%load_ext tensorboard\n" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "793e06aa-0230-433f-a92a-6c32846bc444", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:27:50.307150Z", + "start_time": "2024-12-29T19:27:50.304200Z" + } + }, "outputs": [ { "name": "stdout", @@ -22,6 +61,17 @@ "text": [ "()\n" ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2024-12-29 23:09:19.737726: I metal_plugin/src/device/metal_device.cc:1154] Metal device set to: Apple M2\n", + "2024-12-29 23:09:19.737750: I metal_plugin/src/device/metal_device.cc:296] systemMemory: 16.00 GB\n", + "2024-12-29 23:09:19.737756: I metal_plugin/src/device/metal_device.cc:313] maxCacheSize: 5.33 GB\n", + "2024-12-29 23:09:19.737769: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.\n", + "2024-12-29 23:09:19.737778: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: )\n" + ] } ], "source": [ @@ -31,9 +81,14 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "4ea11dda-ab38-4e21-97e4-c318c0790ec7", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:27:53.630687Z", + "start_time": "2024-12-29T19:27:53.627165Z" + } + }, "outputs": [ { "name": "stdout", @@ -50,9 +105,14 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "id": "a3394f67-a3fc-4c26-887e-70c315703d65", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:27:55.934553Z", + "start_time": "2024-12-29T19:27:55.925292Z" + } + }, "outputs": [ { "name": "stdout", @@ -77,9 +137,14 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 6, "id": "e3b108ce-d5ec-421f-a655-5b9c6ecc299d", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:27:58.162658Z", + "start_time": "2024-12-29T19:27:58.158969Z" + } + }, "outputs": [ { "name": "stdout", @@ -96,9 +161,14 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 7, "id": "d33d85e8-43e8-4a20-aa31-6303b774d0da", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:28:00.310769Z", + "start_time": "2024-12-29T19:28:00.307345Z" + } + }, "outputs": [], "source": [ "import tensorflow as tf\n", @@ -113,9 +183,14 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 8, "id": "6ed0c75b-a964-48df-a9dd-b6e0a8dcbafa", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:28:02.677382Z", + "start_time": "2024-12-29T19:28:02.673991Z" + } + }, "outputs": [ { "name": "stdout", @@ -131,9 +206,14 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 9, "id": "45bdd81b-c86d-4abc-804f-3d43a60382be", - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2024-12-29T19:29:26.646642Z", + "start_time": "2024-12-29T19:29:26.635782Z" + } + }, "outputs": [ { "name": "stdout", @@ -176,7 +256,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 10, "id": "0ac17c30-2312-40a2-9df9-66d088e1a6b5", "metadata": {}, "outputs": [ @@ -184,7 +264,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "[[-0.24501422 -0.5116961 -0.44979703]]\n", + "[[ 1.1468321 -1.8221927 1.7510278]]\n", "[[4 5]]\n" ] } @@ -215,7 +295,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 11, "id": "b3c566e4-6643-4af4-a13f-ed69c6ac259f", "metadata": {}, "outputs": [], @@ -229,7 +309,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 12, "id": "28ad88bb-f378-47b0-aaf9-87c43b1260f1", "metadata": {}, "outputs": [ @@ -237,7 +317,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "-1.6479137\n" + "-1.2997332\n" ] } ], @@ -274,18 +354,10 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 13, "id": "0841827f-1770-4b6c-97e7-01c1aedde23b", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Trace already enabled\n" - ] - } - ], + "outputs": [], "source": [ "logdir = \"logs/graph_demo\"\n", "writer = tf.summary.create_file_writer(logdir)\n", @@ -298,14 +370,14 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 14, "id": "bb359e92-3724-4e0b-a247-1138000553c6", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Reusing TensorBoard on port 6006 (pid 36911), started 0:00:18 ago. (Use '!kill 36911' to kill it.)" + "Reusing TensorBoard on port 6006 (pid 85848), started 2:35:02 ago. (Use '!kill 85848' to kill it.)" ] }, "metadata": {}, @@ -315,11 +387,11 @@ "data": { "text/html": [ "\n", - " \n", "