【发布时间】:2022-11-28 21:56:19
【问题描述】:
我正面临这个 AttributeError: 'NoneType' object has no attribute 'compile'
def get_gan(disc, gen):
# For the combined model we will only train the generator
disc.trainable = False
gan = Sequential()
gan.add(gen)
gan.add(disc)
# gan_input = Input(shape=(NOISE_SIZE,))
# x = generator(gan_input)
# gan_out = discriminator(x)
# gan = Model(gan_input, gan_out)
gan.summary()
gan = get_gan(discriminator, generator)
gan.compile(loss='binary_crossentropy',optimizer=Adam(lr=LR_G, beta_1=BETA1))
请帮忙,因为我找不到问题出在哪里:(
【问题讨论】:
标签: python