def model_generator():
nch = 256
g_input = Input(shape=[100])
H = Dense(nch * 14 * 14)(g_input)
H = BatchNormalization(mode=2)(H)
H = Activation('relu')(H)
H = dim_ordering_reshape(nch, 14)(H)
H = UpSampling2D(size=(2, 2))(H)
H = Convolution2D(int(nch / 2), 3, 3, border_mode='same')(H)
H = BatchNormalization(mode=2, axis=1)(H)
H = Activation('relu')(H)
H = Convolution2D(int(nch / 4), 3, 3, border_mode='same')(H)
H = BatchNormalization(mode=2, axis=1)(H)
H = Activation('relu')(H)
H = Convolution2D(1, 1, 1, border_mode='same')(H)
g_V = Activation('sigmoid')(H)
return Model(g_input, g_V)
example_gan_convolutional.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录