May 2019
Intermediate to advanced
272 pages
7h 19m
English
Finally, let's look at the training loop in the following steps:
for i in range(n_iterations): # freeze generator weights and sample z D.trainable = True G.trainable = False z = np.random.normal(0, 1, size=(batch_size, z_dim))
real_batch = next(data_iterator) images_batch = images_from_bytes(real_batch[0]) emb_text_batch = real_batch[1]
loss_d = D_model.train_on_batch( [images_batch, emb_text_batch, z], [ones, zeros, zeros])
D.trainable = False G.trainable = True z = np.random.normal(0, 1, size=(batch_size, ...
Read now
Unlock full access