I was trying to implement https://github.com/roatienza/Deep-Learning-Experiments/blob/master/Experiments/Tensorflow/GAN/dcgan_mnist.py and it works fine. But I tried the exact same code without the wrapper class ie I wrote just one class DCGAN and tried to build D, G and AM in the same class through various functions. I came across very weird Keras errors like TypeError: __call__() missing 1 required positional argument: 'inputs' for the line
|
self.AM.add(self.discriminator()) |
. Does this mean the Keras's
Sequential object is stateful and changes usage based on whether it is used in the same class or different one?
Also, I noticed that there's a lot of duct-tape code like
This pattern is repeated whenever you create a D/G/AM model. Why is this. Is this related to the other questions I raised?
I was trying to implement https://github.com/roatienza/Deep-Learning-Experiments/blob/master/Experiments/Tensorflow/GAN/dcgan_mnist.py and it works fine. But I tried the exact same code without the wrapper class ie I wrote just one class DCGAN and tried to build D, G and AM in the same class through various functions. I came across very weird Keras errors like
TypeError: __call__() missing 1 required positional argument: 'inputs'for the lineDeep-Learning-Experiments/Experiments/Tensorflow/GAN/dcgan_mnist.py
Line 133 in e501cc3
Sequentialobject is stateful and changes usage based on whether it is used in the same class or different one?Also, I noticed that there's a lot of duct-tape code like
This pattern is repeated whenever you create a D/G/AM model. Why is this. Is this related to the other questions I raised?