TensorFlow函数:tf.layers.InputSpec

2018-07-12 13:58 更新

tf.layers.InputSpec函数

InputSpec类

别名:

  • 类 tf.keras.layers.InputSpec
  • 类 tf.layers.InputSpec

定义在:tensorflow/python/layers/base.py.

指定图层的每个输入的ndim,dtype和形状.

每个层都应公开(如果适用)一个input_spec属性:InputSpec的实例列表(每个输入张量一个).

形状中的“None”条目与任何维度兼容,None形状与任何形状兼容.

参数:

  • dtype:输入的预期DataType.
  • shape:形状元组,输入的预期形状(未经检查的轴可能包括无).
  • ndim:整数,输入的预期秩.
  • max_ndim:整数,输入的最大秩.
  • min_ndim:整数,输入的最小秩.
  • axes:字典将整数轴映射到特定的维值.

方法

__init__

__init__(
    dtype=None,
    shape=None,
    ndim=None,
    max_ndim=None,
    min_ndim=None,
    axes=None
)

初始化自我.

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy