小编Brm*_*ßio的帖子

更新TensorFlow

我正在使用Ubuntu 14.04,我有一个,TensorFlow V0.10但我想更新这个版本.如果我做:

$ pip install --upgrade $TF_BINARY_URL
Run Code Online (Sandbox Code Playgroud)

但它打印:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files
    do_download,
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_url
    self.session,
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
    download_hash = _download_url(resp, link, temp_location)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
    for chunk in resp_read(4096):
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
    chunk_size, …
Run Code Online (Sandbox Code Playgroud)

python upgrade deep-learning tensorflow

22
推荐指数
4
解决办法
10万
查看次数

control_dependencies函数有什么作用?

我想举个例子来说明函数的用法tf.control_dependencies.例如,我要创建两个张量XY和它们是否相等或做一些印刷.

import tensorflow as tf

session = tf.Session()

X = tf.constant(5)
Y = tf.constant(50)

with tf.control_dependencies([tf.assert_equal(X, Y)]):
    print('X and Y are equal!')
Run Code Online (Sandbox Code Playgroud)

在上面的代码中,X显然不等于Y.tf.control_dependencies在这种情况下做什么?

python tensorflow

19
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×2

tensorflow ×2

deep-learning ×1

upgrade ×1