The Discriminator and generator models used in the paper are 1D Convolutions based on the ResNet architecture. We use 2D Convolutions with a singleton dimension for better computational performance.
Model implementation
Helper functions
We start with the necessary imports and initializations:
from keras.layers import Conv2D, Activation
from keras.layers import Add, Lambda
from keras.initializers import RandomNormal
weight_init = RandomNormal(mean=0., stddev=0.02)
Then we use the helper function that defines a ResNet block:
from keras.layers import Conv2D, Activation
from keras.layers import Add, Lambda
from keras.initializers import RandomNormal
weight_init = RandomNormal(mean=0., stddev=0.02)
def resnet_block(input, n_blocks, n_filters...