How to solve “We currently do not support distribution strategy with a Sequential model that is created without input_shape/input_dim set in its first layer or a subclassed model.” In TensorFlow?

Ask Questions Forum: ask Machine Learning Questions to our readersCategory: TensorFlow/KerasHow to solve “We currently do not support distribution strategy with a Sequential model that is created without input_shape/input_dim set in its first layer or a subclassed model.” In TensorFlow?
Chris Staff asked 3 weeks ago
1 Answers
Best Answer
Chris Staff answered 3 weeks ago

You must not forget to add an input_shape to your model’s first layer if it’s a 2D input, or a input_dim if it’s an 1D input. model.add(Conv2D(....,input_shape = (120,160,1) , ....)

Also make sure to use an Input layer if you are using the Functional API: you cannot use the data directly.

Your Answer

8 + 7 =