Skip to content

Commit

Permalink
Added more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-kev committed May 3, 2024
1 parent 035b60e commit 901ab71
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plotting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
],
"source": [
"# Load discriminator results for real and fake data \n",
"# Plot discriminator results for real and fake data for GAN \n",
"with open('saved_losses/gan_dis_fake_arr.pkl', 'rb') as f:\n",
" gan_dis_fake_arr = pickle.load(f)\n",
"with open('saved_losses/gan_dis_real_arr.pkl', 'rb') as f:\n",
Expand Down Expand Up @@ -66,7 +66,7 @@
}
],
"source": [
"# Load loss of discriminator and generator for GAN \n",
"# Plot loss of discriminator and generator for GAN \n",
"with open('saved_losses/gan_dis_loss_arr.pkl', 'rb') as f:\n",
" gan_dis_fake_arr = pickle.load(f)\n",
"with open('saved_losses/gan_gen_loss_arr.pkl', 'rb') as f:\n",
Expand Down Expand Up @@ -102,7 +102,7 @@
}
],
"source": [
"# Load discriminator results for real and fake data \n",
"# Plot discriminator results for real and fake data for WGAN \n",
"with open('saved_losses/wgan_dis_fake_arr.pkl', 'rb') as f:\n",
" gan_dis_fake_arr = pickle.load(f)\n",
"with open('saved_losses/wgan_dis_real_arr.pkl', 'rb') as f:\n",
Expand Down Expand Up @@ -138,7 +138,7 @@
}
],
"source": [
"# Load loss of discriminator and generator for GAN \n",
"# Plot loss of discriminator and generator for WGAN \n",
"with open('saved_losses/wgan_dis_loss_arr.pkl', 'rb') as f:\n",
" gan_dis_fake_arr = pickle.load(f)\n",
"with open('saved_losses/wgan_gen_loss_arr.pkl', 'rb') as f:\n",
Expand Down Expand Up @@ -174,8 +174,10 @@
}
],
"source": [
"# Set seed for reproducible results \n",
"torch.manual_seed(42)\n",
"\n",
"# Plot images generated by GAN \n",
"f, axes = plt.subplots(6,5, layout=\"compressed\")\n",
"\n",
"num_epochs = [1, 2, 5, 10, 50, 100]\n",
Expand Down Expand Up @@ -216,6 +218,7 @@
"source": [
"torch.manual_seed(42)\n",
"\n",
"# Plot images generated by WGAN \n",
"f, axes = plt.subplots(6,5, layout=\"compressed\")\n",
"\n",
"num_epochs = [1, 2, 5, 10, 50, 100]\n",
Expand Down

0 comments on commit 901ab71

Please sign in to comment.