layer_input()
is an alias for keras_input()
.
See ?
keras_input()
for the full documentation.
layer_input(
shape = NULL,
batch_size = NULL,
dtype = NULL,
sparse = NULL,
batch_shape = NULL,
name = NULL,
tensor = NULL,
optional = FALSE
)
A Keras tensor,
which can passed to the inputs
argument of (keras_model()
).
A shape list (list of integers or NULL
objects),
not including the batch size.
For instance, shape = c(32)
indicates that the expected input
will be batches of 32-dimensional vectors. Elements of this list
can be NULL
or NA
; NULL
/NA
elements represent dimensions where the shape
is not known and may vary (e.g. sequence length).
Optional static batch size (integer).
The data type expected by the input, as a string
(e.g. "float32"
, "int32"
...)
A boolean specifying whether the expected input will be sparse
tensors. Note that, if sparse
is FALSE
, sparse tensors can still
be passed into the input - they will be densified with a default
value of 0. This feature is only supported with the TensorFlow
backend. Defaults to FALSE
.
Optional shape list (list of integers or NULL
objects),
including the batch size.
Optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided.
Optional existing tensor to wrap into the Input
layer.
If set, the layer will use this tensor rather
than creating a new placeholder tensor.
Boolean, whether the input is optional or not.
An optional input can accept NULL
values.