# tf.keras.layers.InputLayer

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/engine/input_layer.py#L33-L159) |

Layer to be used as an entry point into a Network (a graph of layers).

Inherits From: [`Layer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/layers/Layer)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.layers.InputLayer`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer), \`tf.compat.v2.keras.layers.InputLayer\`

<br />

    tf.keras.layers.InputLayer(
        input_shape=None, batch_size=None, dtype=None, input_tensor=None, sparse=False,
        name=None, ragged=False, **kwargs
    )

It can either wrap an existing tensor (pass an `input_tensor` argument)
or create a placeholder tensor (pass arguments `input_shape`, and
optionally, `dtype`).

It is generally recommend to use the functional layer API via `Input`,
(which creates an `InputLayer`) without directly using `InputLayer`.

This class can create placeholders for tf.Tensors, tf.SparseTensors, and
tf.RaggedTensors by choosing 'sparse=True' or 'ragged=True'.

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `input_shape` | Shape tuple (not including the batch axis), or `TensorShape` instance (not including the batch axis). |
| `batch_size` | Optional input batch size (integer or None). |
| `dtype` | Datatype of the input. |
| `input_tensor` | Optional tensor to use as layer input instead of creating a placeholder. |
| `sparse` | Boolean, whether the placeholder created is meant to be sparse. |
| `ragged` | Boolean, whether the placeholder created is meant to be ragged. In this case, values of 'None' in the 'shape' argument represent ragged dimensions. For more information about RaggedTensors, see <https://www.tensorflow.org/guide/ragged_tensors> |
| `name` | Name of the layer (string). |

<br />