您的位置:首页 > 其它

tf.Tensor.eval的使用方法

2018-01-19 12:02 369 查看
eval

eval(
    feed_dict=None,
    session=None
)

Evaluates this tensor in a Session.

Calling this method will execute all preceding operations that produce the inputs needed for the operation that produces this tensor.

N.B. Before invoking Tensor.eval(), its graph must have been launched in a session, and either a default session must be available, or session must be specified explicitly.

Args:

feed_dict: A dictionary that maps Tensor objects to feed values. See tf.Session.run for a description of the valid feed values.
session: (Optional.) The Session to be used to evaluate this tensor. If none, the default session will be used.

Returns:
A numpy array corresponding to the value of this tensor.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Tensorflow
相关文章推荐