January 2019
Intermediate to advanced
316 pages
8h 16m
English
To test the networks, create the generator and the discriminator networks. Then, load the learned weights. Finally, use the predict() method to generate predictions:
# Create modelsgenerator = build_generator()discriminator = build_discriminator()# Load model weightsgenerator.load_weights(os.path.join(generated_volumes_dir, "generator_weights.h5"), True)discriminator.load_weights(os.path.join(generated_volumes_dir, "discriminator_weights.h5"), True)# Generate 3D imagesz_sample = np.random.normal(0, 0.33, size=[batch_size, 1, 1, 1, z_size]).astype(np.float32)generated_volumes = generator.predict(z_sample, verbose=3)
In this section, we have successfully trained the generator and the discriminator of the 3D-GAN. In the next ...
Read now
Unlock full access