'Keras: Having trouble converting depreciated 'merge' layer to new version
I am trying to implement this model: https://github.com/abhishekkrthakur/is_that_a_duplicate_quora_question/blob/master/deepnet.py but it is from an older version of TF and I am having trouble converting the merge layer. For the sake of brevity I will only post the code where I am having trouble, you can refer to the link if you need more information about the original model and I can supply you any code I did previously.
merged = Concatenate()([model1.output, model2.output, model3.output, model4.output, model5.output, model6.output])
merged_model = Sequential()
merged_model.add(merged_model1)
It was fairly frustrating finding quite a few different ways implement concatenate but I hope I did it correctly as the shape for merged is what it should be (None, 1800). I am still pretty new to using NN and know I bit off more than I could chew but I am hoping you guys can help before I must give up on it. Thanks for any help!
- Edit: well I figured it out, if anyone comes across the same problem..
merged = Concatenate()([model1.output, model2.output, model3.output, model4.output, model5.output, model6.output])
merged = *your layer*(merged)
Now I have a type error in user code: "TypeError: Expected int32, but got 0.0 of type 'float'". It is coming from the word embedding weights but I don't know how to deal with that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|