May 2019
Intermediate to advanced
272 pages
7h 19m
English
In this implementation, the Generator uses multiple residual connections that added the input of a sequence of layers to the output of that sequence of layers. Each sequence of layers consists of a 2D Convolution followed by a Batchnorm and ReLU. The residual connection is then followed by a 2D Transposed Convolution and the operation repeats a few times. First, we define the input using the following code:
def build_generator(z_input_shape=(128,), text_input_shape=(1024,), embedding_dim=128, ngf=64, n_channels=3): # define inputs z_inputs = Input(shape=z_input_shape, name='z_input') text_inputs = Input(shape=text_input_shape, name='text_input')
Then, we project text embeddings using the following code:
text_embedded = Dense(embedding_dim, ...
Read now
Unlock full access