File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 63
63
64
64
discriminator .trainable = False
65
65
66
- gan_input = keras .Input (shape = (latent_dim ,))
67
- gan_output = discriminator (generator (gan_input ))
66
+ gan_input = keras .Input (shape = (latent_dim ,))
67
+ gan_output = discriminator (generator (gan_input ))
68
68
gan = keras .models .Model (gan_input , gan_output )
69
69
70
70
gan_optimizer = keras .optimizers .RMSprop (lr = 0.0004 , clipvalue = 1.0 , decay = 1e-8 )
92
92
random_latent_vectors = np .random .normal (size = (batch_size , latent_dim ))
93
93
94
94
generated_images = generator .predict (random_latent_vectors )
95
-
95
+
96
96
stop = start + batch_size
97
97
real_images = x_train [start : stop ]
98
98
combined_images = np .concatenate ([generated_images , real_images ])
Original file line number Diff line number Diff line change
1
+ print ('checking what CPU / GPU you have available for Keras & Tensorflow' )
2
+
3
+ from tensorflow .python .client import device_lib
4
+ print (device_lib .list_local_devices ())
5
+
Original file line number Diff line number Diff line change @@ -7,5 +7,9 @@ numpy==1.13.0
7
7
opencv-python
8
8
pylint
9
9
tensorflow
10
+ # get that GPU speed!
11
+ tensorflow-gpu
10
12
# html5lib newer version needed to get tensorboard to work
11
- html5lib == 1.0.1
13
+ html5lib == 1.0.1
14
+ # required for PIL -- image manipulation, at least in gan.py
15
+ pillow
You can’t perform that action at this time.
0 commit comments