mjdietzx / SimGAN

Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
MIT License
411 stars 101 forks source link

Incompatible with current version of Keras #17

Open STSpencer opened 5 years ago

STSpencer commented 5 years ago

Hi, I've found a couple of issues related to use of this code with Keras 2.2.4 in sim-gan.py that cause errors. 1) Line 72 needs to be changed to y = layers.merge.Add()([input_features, y]) 2) Line 177 needs to be changed to data_format='channels_last') Thanks for providing the code, it's very helpful.

noushinha commented 1 year ago

Thanks a lot for providing the code. Very simple and easy to follow.

layers.mergeis no longer available in new versions of the keras. So I changed layers.merge to layers.Add and it solved the version incompatibility issue. However, later it causes a 'shape miss match error between input_feature and y.

Any idea how to solve this?

P.S: I am using the .h5 files from the Kaggle repo so the size of input data is (55, 35) for both datasets.

Best, noushin