0
class MyModel(tf.keras.Model):
   def __init__(self, ...):
       ...

   def call(self, input_1, input_2, input_3):
       ....

I want to build above model, so I call build method as follows

model = MyModel(...)
model.build(input_shape = ( (None, 3), (None, 2), (None, 5) ))

However, the following error came out

TypeError: Error converting shape to a TensorShape: Dimension value must be integer or None or have an index method, got value '(None, 3)' with type '<class 'tuple'>'.

How can I build keras model with multiple inputs?

alryosha
  • 641
  • 1
  • 8
  • 15

0 Answers0