'Different keras versions generate different architectures of the same model.. WHY?
Please i am facing problem in building the same model using different Keras versions.
Note that the code was written in Keras 1.x and I am working on reproducing it using Keras 2.x.
the code in Keras 1.x :
a = Input(shape=(1, 512, 512),name='a') #a is the original groundtruth
b = Input(shape=(3, 512, 512),name='b') #b is the original image
# A -> B'
bp = atob(a) # this is to generate fake image (B') from ground truth (A) using atob network
# Discriminator receives the pair of images
d_in = merge([a, bp], mode='concat', concat_axis=1)
pix2pix = Model([a, b], discriminator(d_in), name='d')
while in Keras 2.x using the same code
a = Input(shape=(1, 512, 512),name='a')
b = Input(shape=(2, 512, 512),name='b')
# A -> B'
bp = atob(a)
# Discriminator receives the pair of images
d_in = concatenate([a, bp], axis=1,name='concat')
pix2pix = Model([a, b], discriminator(d_in), name='d')
the Question: why there is an additional layer named InputLayer (b) appeared in the output of Keras 2.x and not appeared in the output of keras 1.x ?
Note: the full code of keras 1.x can be found on Costa_github_line388
Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


