Input(shape, batch_shape, name, dtype, sparse, tensor)
时间: 2023-10-30 20:05:26 浏览: 86
Input is a function provided by the Keras library that creates a new input node for a computational graph. It takes the following parameters:
- shape: A tuple representing the shape of the input data, not including the batch size. For example, if the input data is a 3D tensor with shape (32, 10, 10), the shape parameter should be (10, 10).
- batch_shape: An optional tuple representing the shape of the input data including the batch size. For example, if the input data is a 3D tensor with shape (32, 10, 10), the batch_shape parameter should be (32, 10, 10).
- name: An optional string representing the name of the input node.
- dtype: An optional string representing the data type of the input data.
- sparse: A boolean indicating whether the input data is sparse or not.
- tensor: An optional existing tensor to use as the input node.
The Input function returns a new input node that can be used as the starting point for a computational graph in Keras.
阅读全文