TensorFlow函数:tf.saturate_cast

2018-01-03 10:40 更新

tf.saturate_cast 函数

saturate_cast(
    value,
    dtype,
    name=None
)

定义在:tensorflow/python/ops/math_ops.py.

参见指南:张量变换> Casting

对 dtype 执行一个安全的饱和cast的value.

此函数将输入转换为 dtype,而不应用任何缩放.如果有一个危险,即在cast中value将超过或下溢,则此 op 适用于在cast之前采取适当的夹紧(clamp).

参数

  • value:一个Tensor.
  • dtype:所需的输出DType.
  • name:操作的名称(可选).

返回值

value安全地投给dtype.

以上内容是否对您有帮助:
在线笔记
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