When I run the GAN Model ,I am getting the following error. Please help
/usr/local/lib/python3.6/dist-packages/keras/engine/training.py:297: UserWarning: Discrepancy between trainable weights and collected trainable weights, did you set model.trainable
without calling model.compile
after ?
‘Discrepancy between trainable weights and collected trainable’
FailedPreconditionError Traceback (most recent call last)
in ()
23
24 # Train our Discriminator
—> 25 d_loss_real = discriminator.train_on_batch(real_imgs,real_y)
26 d_loss_fake = discriminator.train_on_batch(fake_imgs,fake_y)
27 d_loss = 0.5d_loss_real + 0.5d_loss_fake
6 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
58 ctx.ensure_initialized()
59 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
—> 60 inputs, attrs, num_outputs)
61 except core._NotOkStatusException as e:
62 if name is not None:
FailedPreconditionError: Error while reading resource variable _AnonymousVar118 from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/_AnonymousVar118/N10tensorflow3VarE does not exist.
[[node mul_88/ReadVariableOp (defined at /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:3009) ]] [Op:__inference_keras_scratch_graph_3778]
Function call stack:
keras_scratch_graph