bigan.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Keras-GAN 作者: eriklindernoren 项目源码 文件源码
def build_encoder(self):
        model = Sequential()

        model.add(Flatten(input_shape=self.img_shape))
        model.add(Dense(512))
        model.add(LeakyReLU(alpha=0.2))
        model.add(BatchNormalization(momentum=0.8))
        model.add(Dense(512))
        model.add(LeakyReLU(alpha=0.2))
        model.add(BatchNormalization(momentum=0.8))
        model.add(Dense(self.latent_dim))

        model.summary()

        img = Input(shape=self.img_shape)
        z = model(img)

        return Model(img, z)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号