Skip to content

Commit

Permalink
Update pip packages and enable dropout layer
Browse files Browse the repository at this point in the history
  • Loading branch information
argraur committed Mar 20, 2024
1 parent b87c863 commit 9d17e2a
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions russian-cursive-32x32rgb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
}
],
"source": [
"%pip install tensorflow pillow"
"%pip install tensorflow pillow\n",
"# %pip install tensorflow-intel pillow # For Intel CPUs\n",
"# %pip install tensorflow tensorflow-metal pillow # For Apple GPUs"
]
},
{
Expand Down Expand Up @@ -333,7 +335,7 @@
" layers.MaxPooling2D(),\n",
" layers.Conv2D(Ns*2**3, kernel_size, padding='same', activation='relu'),\n",
" layers.MaxPooling2D(),\n",
" # layers.Dropout(0.2), результаты становятся хуже\n",
" layers.Dropout(0.1),\n",
" layers.Flatten(),\n",
" layers.Dense(Ns*2**4, activation='relu'),\n",
" layers.Dense(num_classes)\n",
Expand Down Expand Up @@ -526,26 +528,6 @@
"\n",
"model.save('russian-cursive-32x32rgb.model.keras')"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[LogicalDevice(name='/device:CPU:0', device_type='CPU')]"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tf.config.list_logical_devices()"
]
}
],
"metadata": {
Expand Down

0 comments on commit 9d17e2a

Please sign in to comment.