这是从运行脚本以检查Tensorflow是否正常工作时收到的消息:
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally
W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:95] The TensorFlow library wasn't compiled to use AVX instructions, but these are available …
Run Code Online (Sandbox Code Playgroud) 我尝试从pip安装:
pip3 install --user --no-cache https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl
Run Code Online (Sandbox Code Playgroud)
然后尝试导入并得到:
Using TensorFlow backend.
/usr/lib64/python3.6/importlib/_bootstrap.py:205: RuntimeWarning:
compiletime version 3.5 of module
'tensorflow.python.framework.fast_tensor_util' does not match runtime
version 3.6
return f(*args, **kwds)
2017-11-10 09:35:01.206112: I
tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports
instructions that this TensorFlow binary was not compiled to use: SSE4.1
SSE4.2 AVX
Run Code Online (Sandbox Code Playgroud)
问题:
我不明白为什么轮子说3.6,但我得到关于3.5的警告
我想编译为我的CPU优化,所以我可以使用pip从源而不是从二进制轮安装?
如何在Python 3.6 x64中使用TensorFlow GPU版本而不是CPU版本?
import tensorflow as tf
Run Code Online (Sandbox Code Playgroud)
Python正在使用我的CPU进行计算.
我可以注意到它,因为我有一个错误:
您的CPU支持未编译此TensorFlow二进制文件的指令:AVX2
我已经安装了tensorflow和tensorflow-gpu.
如何切换到GPU版本?
我正在尝试使用张量流后端运行二进制分类,但我不断收到错误,我认为该错误要求我使用正确的编译器标志重建张量流。我知道我的代码和数据是功能性的,所以我认为问题出在虚拟环境上。我尝试过在tensorflow的网站、ibm的网站、stackoverflow上寻找解决方案,但都没有成功。我也尝试过重新安装tensorflow和python。
完整回溯:
I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
虚拟环境信息:
-使用anaconda环境
-Python 3.7.9
-张量流2.4.1
我正在尝试运行jupyter笔记本并出现以下错误。我正在将Win 7与Anaconda python 3.7一起使用。
ImportError
:numpy安装出了点问题。导入时,我们在['c:\ users \ paperspace \ anaconda3 \ envs \ tensorflow10 \ lib \ site-packages \ numpy']中检测到了较旧的numpy版本。解决此问题的一种方法是重复卸载numpy,直到找不到为止,然后重新安装此版本。
我已按照错误中提到的步骤进行操作,但仍然无法正常工作。
我有一个与Tensorflow连接的python代码.它应该返回单个结果集.但是我得到了下面提到的警告以及结果.
警告:tensorflow:从C:\ Users\vsureshx079451\AppData\Local\Programs\Python\Python36\lib\site-packages\tflearn\objectives.py:66:使用keep_dims调用reduce_sum(来自tensorflow.python.ops.math_ops)已弃用,将在以后的版本中删除.更新说明:不推荐使用keep_dims,使用keepdims代替2018-02-04 19:12:04.860370:IC:\ tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc :137]您的CPU支持未编译此TensorFlow二进制文件的指令:AVX AVX2
结果在这里!
我将在这里放一小段TensorFlow代码.请让我知道如何压制此警告.
注意:我从C#调用这个Python文件.所以我不想显示除结果之外的任何东西.
代码片段:
self.words = data['words']
self.classes = data['classes']
train_x = data['train_x']
train_y = data['train_y']
with open('intents.json') as json_data:
self.intents = json.load(json_data)
#input("Press Enter to continue...")
tf.reset_default_graph()
net = tflearn.input_data(shape=[None, len(train_x[0])])
net = tflearn.fully_connected(net, 8)
net = tflearn.fully_connected(net, 8)
net = tflearn.fully_connected(net, len(train_y[0]), activation='softmax')
net = tflearn.regression(net)
# Define model and setup tensorboard
self.model = tflearn.DNN(net, tensorboard_dir='tflearn_logs')
Run Code Online (Sandbox Code Playgroud)
编辑:我也试过这个,它没用.
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Ubuntu 上安装 tensorflow,但收到此消息:
(base) k@k-1005:~/Documents/ClassificationTexte/src$ python tester.py
Using TensorFlow backend.
RUN: 1
1.1. Training the classifier...
LABELS: {'negative', 'neutral', 'positive'}
2019-12-10 11:58:13.428875: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags.
2019-12-10 11:58:13.432727: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3190585000 Hz
2019-12-10 11:58:13.433041: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5591c387b750 executing computations on platform …
Run Code Online (Sandbox Code Playgroud) 我一直想尝试 Tensorflow,但我不知道我的系统是否有足够的硬件要求。
这个配置足以运行像图像识别这样的简单人工智能项目吗?我搜索了网站和其他资源,但没有找到有关系统要求的任何详细信息。
有人知道这里的Tensorflow编译的可执行文件是否包括AVX支持?我已经在Google Compute Engine上运行Tensorflow的编译版本,并且运行缓慢。狗慢。冷糖蜜变慢。洛杉矶交通缓慢。本文说,使用AVX支持进行编译可以显着提高Google Compute Engine的性能,但是当我在该站点上执行编译过程时,它将失败。只是想知道AVX是否已在可执行文件中?
performance machine-learning avx google-compute-engine tensorflow