Skip to content

Commit

Permalink
Update Application_and_analyses_of_Trained_model.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
SuihongSong authored Sep 3, 2020
1 parent 09d4caa commit eeacacc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Code/Application_and_analyses_of_Trained_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
"# Initialize TensorFlow session.\n",
"tf.InteractiveSession()\n",
"\n",
"# final trained generator directory path.\n",
"# pre-trained generator directory path.\n",
"network_dir = '/scratch/users/suihong/ProGAN_MultiChannel_Reusults_ConditionedtoMultiConditions_TF/Unconditional_prog/'\n",
"\n",
"# replace with pre-trained generator name.\n",
"with open(network_dir + 'network-snapshot-011520.pkl', 'rb') as file:\n",
" G, D, Gs = pickle.load(file)\n"
]
Expand Down Expand Up @@ -76,11 +78,11 @@
"fig, ax = plt.subplots(6, 6, sharex='col', sharey='row')\n",
"fig.set_size_inches(10.5, 10.5, forward=True)\n",
"\n",
"# Generate latent vectors.\n",
"# Generate random latent vectors.\n",
"latents_plt = np.random.RandomState(63).randn(6 * 6, Gs.input_shapes[0][1]) # 1000 random latents *Gs.input_shapes = [None, 128] [None, 4] [None, 1, 64, 64]\n",
"labels_plt = np.zeros([6 * 6] + Gs.input_shapes[1][1:]) #np.repeat(labels_plt, 5 * 6, axis=0)\n",
"\n",
"# Run the generator to produce a set of images.\n",
"# Run the generator to produce a set of facies models.\n",
"images_plt = Gs.run(latents_plt, labels_plt)\n",
"images_plt = np.where(images_plt< -0.3, -1, images_plt)\n",
"images_plt = np.where(images_plt> 0.3, 1, images_plt)\n",
Expand All @@ -97,7 +99,7 @@
"collapsed": true
},
"source": [
"#### Randomly sample and plot facies models from trained generator"
"#### Randomly sample facies models from training data"
]
},
{
Expand Down

0 comments on commit eeacacc

Please sign in to comment.