Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keras: What is the difference between layers.Input and layers.InputLayer?

When should I use Input and when should I use InputLayer? In the source code there is a description, but I am not sure what it means.

InputLayer:

Layer to be used as an entry point into a graph. It can either wrap an existing tensor (pass an input_tensor argument) or create its a placeholder tensor (pass arguments input_shape or batch_input_shape as well as dtype).

Input:

Input() is used to instantiate a Keras tensor. A Keras tensor is a tensor object from the underlying backend (Theano or TensorFlow), which we augment with certain attributes that allow us to build a Keras model just by knowing the inputs and outputs of the model.

like image 635
Toke Faurby Avatar asked Oct 29 '22 06:10

Toke Faurby


1 Answers

I think InputLayer has been deprecated together with the Graph models. I would suggest you use Input, as all the examples on the Keras documentations show.

like image 65
Michele Tonutti Avatar answered Nov 05 '22 18:11

Michele Tonutti