Reputation: 31
Could someone explain what the advantage of using keras.layers.InputLayer
over the keras.Input
tensor is? I understand that one is a tensor, the other is a layer object. However my question is more from a practical point of view as in why one would define the input in a certain way when using the functional API.
Thanks!
Upvotes: 3
Views: 820
Reputation:
For the benefit of community providing solution here
It is generally recommend to use the functional layer API via Input
, (which creates an InputLayer
) without directly using InputLayer
. When using InputLayer
with Keras Sequential model, it can be skipped by moving the input_shape
parameter to the first layer after the InputLayer
. For more details you can refer this and this.
Upvotes: 3