layer_input: Input layer

View source: R/layers-core.R

layer_inputR Documentation

Input layer

Description

Layer to be used as an entry point into a graph.

Usage

layer_input(
  shape = NULL,
  batch_shape = NULL,
  name = NULL,
  dtype = NULL,
  sparse = FALSE,
  tensor = NULL,
  ragged = FALSE
)

Arguments

shape

Shape, not including the batch size. For instance, shape=c(32) indicates that the expected input will be batches of 32-dimensional vectors.

batch_shape

Shape, including the batch size. For instance, shape = c(10,32) indicates that the expected input will be batches of 10 32-dimensional vectors. batch_shape = list(NULL, 32) indicates batches of an arbitrary number of 32-dimensional vectors.

name

An 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.

dtype

The data type expected by the input, as a string (float32, float64, int32...)

sparse

Boolean, whether the placeholder created is meant to be sparse.

tensor

Existing tensor to wrap into the Input layer. If set, the layer will not create a placeholder tensor.

ragged

A boolean specifying whether the placeholder to be created is ragged. Only one of 'ragged' and 'sparse' can be TRUE In this case, values of 'NULL' in the 'shape' argument represent ragged dimensions.

Value

A tensor

See Also

Other core layers: layer_activation(), layer_activity_regularization(), layer_attention(), layer_dense(), layer_dense_features(), layer_dropout(), layer_flatten(), layer_lambda(), layer_masking(), layer_permute(), layer_repeat_vector(), layer_reshape()


keras documentation built on May 29, 2024, 3:20 a.m.