Input

dragon.vm.tensorflow.keras.Input(
  shape=None,
  batch_size=None,
  name=None,
  dtype=None,
  tensor=None,
  **kwargs
)[source]

Create a symbolic tensor as the placeholder.

Examples:

# Create a placeholder shape as (None, 8)
x = tf.keras.Input(shape=(8,), dtype='float32')

# Create a placeholder with determined ``batch_size``
x = tf.keras.Input(shape=(8,), batch_size=8, dtype='float32')

# Create a placeholder aliasing an existing tensor
x = dragon.Tensor(shape=(8,), dtype='float32').constant()
y = tf.keras.Input(tensor=x)
Parameters:
  • shape (Sequence[int], optional) – The input shape excluding batch_size.
  • batch_size (int, optional) – The dimension insert at the first axis.
  • name (str, optional) – The optional placeholder name.
  • dtype (str, optional) – The optional data type.
  • tensor (dragon.Tensor, optional) – The existing tensor aliased to input.
Returns:

dragon.Tensor – The output tensor.