tf.keras.layers.InputLayer
Stay organized with collections
Save and categorize content based on your preferences.
Layer to be used as an entry point into a Network (a graph of layers).
Inherits From: Layer
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'.
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).
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2020-10-01 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]