StyleGAN-Keras
StyleGAN-Keras copied to clipboard
Google Colab Error: ValueError: Layer model_2 expects 9 inputs, but it received 3 input tensors.
Hi, I tried setting the project up in google colab, but I'm getting the error as mentioned. Are any of you getting the same error on a local machine?
<ipython-input-16-cdeedf397bcc> in load(self, num)
485
486 self.generator = self.GAN.generator()
--> 487 self.DisModel = self.GAN.DisModel()
488 self.AdModel = self.GAN.AdModel()
489
<ipython-input-16-cdeedf397bcc> in DisModel(self)
297 gi2 = Input(shape = [im_size, im_size, 1])
298 gi3 = Input(shape = [1])
--> 299 gf = self.G([gi, gi2, gi3])
300 df = self.D(gf)
301
/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py in __call__(self, inputs, **kwargs)
438 # Raise exceptions in case the input is not compatible
439 # with the input_spec set at build time.
--> 440 self.assert_input_compatibility(inputs)
441
442 # Handle mask propagation.
/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py in assert_input_compatibility(self, inputs)
297 'but it received ' + str(len(inputs)) +
298 ' input tensors. Input received: ' +
--> 299 str(inputs))
300 for input_index, (x, spec) in enumerate(zip(inputs, input_spec)):
301 if spec is None:
ValueError: Layer model_2 expects 9 inputs, but it received 3 input tensors. Input received: [<tf.Tensor 'input_88:0' shape=(?, 512) dtype=float32>, <tf.Tensor 'input_89:0' shape=(?, 256, 256, 1) dtype=float32>, <tf.Tensor 'input_90:0' shape=(?, 1) dtype=float32>]
I get the same error.. @manicman1999 Can you tell me your environment?(ex. keras version .. etc)
Did anyone find the solution to this?
Any update for this question, i have a similar error:
I have the same problem. any updates?