首页 > 解决方案 > TensorFlow 已弃用,将在未来版本中删除

问题描述

我正在从事一个文本分析项目并遇到了这个问题。我对此比较陌生,需要一些帮助。

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-05-18 14:05:27.509979: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-05-18 14:05:27.519894: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300000000 Hz
2019-05-18 14:05:27.520162: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55fb48e438f0 executing computations on platform Host. Devices:
2019-05-18 14:05:27.520203: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
2019-05-18 14:05:27.520514: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

标签: tensorflow

解决方案


你可以使用:

import tensorflow as tf

tf.logging.set_verbosity(tf.logging.ERROR)

为了清除警告。


推荐阅读