张量流急切模块中的错误 [英] Error in tensorflow eager module

查看:31
本文介绍了张量流急切模块中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的操作系统是 Ubuntu 16.04

My OS is Ubuntu 16.04

Python 版本为 3.5

Python version is 3.5

Tensorflow 版本是 14.0

Tensorflow version is 14.0

当我为 TF Eager 模块尝试一个简单的代码时

When I tried a simple code for TF Eager module

import tensorflow as tf
import tensorflow.contrib.eager as tfe
tfe.enable_eager_execution()
x = [[2.]]
m = tf.matmul(x, x)

我得到了

属性错误:模块tensorflow.contrib.eager"没有属性enable_eager_execution"

AttributeError: module 'tensorflow.contrib.eager' has no attribute 'enable_eager_execution'

怎么了?

推荐答案

来自 Eager 用户指南:

Eager Execution 不包含在 TensorFlow 的最新版本(1.4 版)中.要使用它,您需要从源代码构建 TensorFlow 或安装夜间构建.

Eager execution is not included in the latest release (version 1.4) of TensorFlow. To use it, you will need to build TensorFlow from source or install the nightly builds.

尝试安装 Tensorflow 的夜间版本而不是 1.4.0.

Try to install the nightly build of Tensorflow instead of 1.4.0.

这篇关于张量流急切模块中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆