前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >tf.OpError

tf.OpError

作者头像
狼啸风云
修改2022-09-03 19:39:57
5070
修改2022-09-03 19:39:57
举报

tf.OpError

class tf.OpError

class tf.errors.OpError

Defined in tensorflow/python/framework/errors_impl.py.

See the guide: Running Graphs > Error classes and convenience functions

A generic error that is raised when TensorFlow execution fails.Whenever possible, the session will raise a more specific subclass of OpError from the tf.errors module.

Properties

error_code

The integer error code that describes the error.

message

The error message that describes the error.

node_def

The NodeDef proto representing the op that failed.

op

The operation that failed, if known.

N.B. If the failed op was synthesized at runtime, e.g. a Send or Recv op, there will be no corresponding tf.Operation object. In that case, this will return None, and you should instead use the tf.OpError.node_def to discover information about the op.

Returns:

The Operation that failed, or None.

Methods

__init__

__init__(
    node_def,
    op,
    message,
    error_code
)

Creates a new OpError indicating that a particular op failed.

Args:

  • node_def: The node_def_pb2.NodeDef proto representing the op that failed, if known; otherwise None.
  • op: The ops.Operation that failed, if known; otherwise None.
  • message: The message string describing the failure.
  • error_code: The error_codes_pb2.Code describing the error.
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-11-18 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档