Closed ldenoue closed 5 years ago
Perhaps this:
from keras.engine.topology import Network
instead of Container
in_img = Lambda(lambda x: x[0] * (1 - x[1]), output_shape=input_shape)([org_img, mask])
completion = Lambda(lambda x: x[0] * x[2] + x[1] * (1 - x[2]), output_shape=input_shape)([imitation, org_img, mask])
and replace Container with Network throughout.
It may be the same as this problem. https://github.com/keras-team/keras/issues/3921#issuecomment-306031159
I think Merge was used to compute the in_img
and completion
variables, using a Lambda function.
But add or concatenate from Keras 2.2 are not useful for that, which is why I used a Lambda directly.
I made it work with keras = 2.2.2 and tensorflow = 1.4.0. Please try it. neka-nat/image_completion_keras@ba3dc5b
I get this error on Keras 2.2.2. Any idea how to replace the merge?