tflearn.layers.input_data = tflearn.layers.core.input_data

简介:


input_data(shape=None, placeholder=None, dtype=tf.float32, data_preprocessing=None, data_augmentation=None, name='InputData')

    Input Data.

    

    This layer is used for inputting (aka. feeding) data to a network.

    A TensorFlow placeholder will be used if it is supplied,

    otherwise a new placeholder will be created with the given shape.

    

    Either a shape or placeholder must be provided, otherwise an

    exception will be raised.

    

    Furthermore, the placeholder is added to TensorFlow collections

    so it can be retrieved using tf.get_collection(tf.GraphKeys.INPUTS)

    as well as tf.GraphKeys.LAYER_TENSOR + '/' + name. Similarly for

    the data preprocessing and augmentation objects which are stored in

    the collections with tf.GraphKeys.DATA_PREP and tf.GraphKeys.DATA_AUG.

    This allows other parts of TFLearn to easily retrieve and use these

    objects by referencing these graph-keys.

    

    Input:

        List of `int` (Shape), to create a new placeholder.

            Or

        `Tensor` (Placeholder), to use an existing placeholder.

    

    Output:

        Placeholder Tensor with given shape.

    

    Arguments:

        shape: list of `int`. An array or tuple representing input data shape.

            It is required if no placeholder is provided. First element should

            be 'None' (representing batch size), if not provided, it will be

            added automatically.

        placeholder: A Placeholder to use for feeding this layer (optional).

            If not specified, a placeholder will be automatically created.

            You can retrieve that placeholder through graph key: 'INPUTS',

            or the 'placeholder' attribute of this function's returned tensor.

        dtype: `tf.type`, Placeholder data type (optional). Default: float32.

        data_preprocessing: A `DataPreprocessing` subclass object to manage

            real-time data pre-processing when training and predicting (such

            as zero center data, std normalization...).

        data_augmentation: `DataAugmentation`. A `DataAugmentation` subclass

            object to manage real-time data augmentation while training (

            such as random image crop, random image flip, random sequence

            reverse...).

        name: `str`. A name for this layer (optional).


目录
相关文章
|
3月前
|
TensorFlow 算法框架/工具
【Tensorflow】解决A `Concatenate` layer should be called on a list of at least 2 inputs
在TensorFlow 2.0中,使用Concatenate函数时出现错误,可以通过替换为tf.concat 来解决。
44 4
|
3月前
|
TensorFlow 算法框架/工具
【Tensorflow+Keras】tf.keras.backend.image_data_format()的解析与举例使用
介绍了TensorFlow和Keras中tf.keras.backend.image_data_format()函数的用法。
52 5
|
3月前
|
机器学习/深度学习 TensorFlow 算法框架/工具
【Tensorflow+keras】解决cuDNN launch failure : input shape ([32,2,8,8]) [[{{node sequential_1/batch_nor
在使用TensorFlow 2.0和Keras训练生成对抗网络(GAN)时,遇到了“cuDNN launch failure”错误,特别是在调用self.generator.predict方法时出现,输入形状为([32,2,8,8])。此问题可能源于输入数据形状与模型期望的形状不匹配或cuDNN版本不兼容。解决方案包括设置GPU内存增长、检查模型定义和输入数据形状、以及确保TensorFlow和cuDNN版本兼容。
49 1
|
3月前
|
TensorFlow API 算法框架/工具
【Tensorflow】解决Inputs to eager execution function cannot be Keras symbolic tensors, but found [<tf.Te
文章讨论了在使用Tensorflow 2.3时遇到的一个错误:"Inputs to eager execution function cannot be Keras symbolic tensors...",这个问题通常与Tensorflow的eager execution(急切执行)模式有关,提供了三种解决这个问题的方法。
42 1
|
3月前
|
TensorFlow API 算法框架/工具
【Tensorflow+keras】解决使用model.load_weights时报错 ‘str‘ object has no attribute ‘decode‘
python 3.6,Tensorflow 2.0,在使用Tensorflow 的keras API,加载权重模型时,报错’str’ object has no attribute ‘decode’
54 0
|
4月前
|
PyTorch 算法框架/工具 机器学习/深度学习
|
6月前
|
存储 PyTorch 算法框架/工具
torch.Storage()是什么?和torch.Tensor()有什么区别?
torch.Storage()是什么?和torch.Tensor()有什么区别?
48 1
torch.argmax(dim=1)用法
)torch.argmax(input, dim=None, keepdim=False)返回指定维度最大值的序号;
640 0
|
API 数据格式
TensorFlow2._:model.summary() Output Shape为multiple解决方法
TensorFlow2._:model.summary() Output Shape为multiple解决方法
279 0
TensorFlow2._:model.summary() Output Shape为multiple解决方法
|
PyTorch 算法框架/工具 异构计算
Pytorch出现RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor)
这个问题的主要原因是输入的数据类型与网络参数的类型不符。
600 0