@怎么把tensor转变成numpy
1、由于tensorflow的升级,所以要加上tf.vompat.v1.diable_egger_exectution(),具体代码如下
下面展示一些 内联代码片
。
// A code block
a = tf.constant([1,2,3])
tf.compat.v1.diable_eager_exection()
a = tf.compat.v1.Session().run(a)
// An highlighted block
a = tf.constant([1,2,3])
tf.compat.v1.