我只是简单地输入了tf.Tensor Tensorflow 2.0 中给出的代码,这是我的代码:
import tensorflow as tf
print(tf.__version__)
# Build a dataflow graph.
c = tf.constant([[1.0, 2.0], [3.0, 4.0]])
d = tf.constant([[1.0, 1.0], [0.0, 1.0]])
e = tf.matmul(c, d)
# Construct a `Session` to execute the graph.
sess = tf.compat.v1.Session()
# Execute the graph and store the value that `e` represents in `result`.
result = sess.run(e)
Run Code Online (Sandbox Code Playgroud)
但它引发了一个错误:
2.0.0-beta1
2019-07-25 17:06:35.972372: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA …
Run Code Online (Sandbox Code Playgroud)