TensorFlow取消操作或步骤时引发的error

2018-09-13 15:46 更新

tf.errors.CancelledError

tf.errors.CancelledError 类

定义在:tensorflow/python/framework/errors_impl.py

请参阅指南:运行图>错误类和方便功能

取消操作或步骤时引发.

例如,一个长时间运行的操作 (例如 tf.QueueBase.enqueue ) 可以通过运行另一项操作 (如 tf.QueueBase.close 或 tf.Session.close) 取消.运行此类长时间运行的操作的步骤将通过引发 CancelledError 而失败.

属性

  • error_code:        
    描述错误的整数错误代码.
  • message:        
    描述错误的错误消息.
  • node_def:        
    NodeDef代表运算的原型失败了.
  • op:        
    失败的操作,如果知道的话.
    注意如果失败的运算在运行时合成,例如一个 Send 或 Recv 运算,没有相应的 tf.Operation 对象.在这种情况下,这将返回 None,应该您使用 tf.OpError.node_def来发现关于操作的信息.

返回:

在Operation失败或无.

方法

__init__

__init__ (
node_def ,
op ,
message
)

创建一个 CancelledError.

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