【发布时间】:2018-07-14 11:52:45
【问题描述】:
我有一个与 Tensorflow 连接的 python 代码。它应该返回单个结果集。但是我收到了下面提到的警告以及结果。
警告:张量流:来自 C:\Users\vsureshx079451\AppData\Local\Programs\Python\Python36\lib\site-packages\tflearn\objectives.py:66: 调用reduce_sum(来自tensorflow.python.ops.math_ops) keep_dims 已弃用,将在未来版本中删除。 更新说明:keep_dims 已弃用,请使用 keepdims 相反 2018-02-04 19:12:04.860370: 我 C:\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')
编辑: 我也试过了,还是不行。
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
【问题讨论】:
标签: python tensorflow tflearn