Updating GAN Code...

This commit is contained in:
Shubbair 2024-07-28 17:56:26 +03:00
parent d17d293df9
commit c0c8293842

View File

@ -388,16 +388,16 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array(0.662747, dtype=float32)"
"array(0.675341, dtype=float32)"
]
},
"execution_count": 40,
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
@ -418,7 +418,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 44,
"metadata": {},
"outputs": [
{
@ -427,7 +427,7 @@
"60000"
]
},
"execution_count": 41,
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
@ -438,7 +438,7 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 45,
"metadata": {},
"outputs": [
{
@ -452,7 +452,7 @@
"source": [
"# Train the GAN for only 1000 images\n",
"batch_size = 16\n",
"display_step = 50\n",
"display_step = 20\n",
"cur_step = 0\n",
"mean_generator_loss = 0\n",
"mean_discriminator_loss = 0\n",
@ -463,7 +463,7 @@
"\n",
"for epoch in tqdm(range(200)):\n",
"\n",
" for real in batch_iterate(batch_size, train_images[:1000]):\n",
" for real in batch_iterate(batch_size, train_images[:500]):\n",
" \n",
" D_loss,D_grads = D_loss_grad(gen, disc, real, batch_size, z_dim)\n",
"\n",