私はTensorflow
(深い学習のライブラリー)で動作するPythonのを使用したい
私は機能control_dependencies
の使用を示す例をしたい、例えば私は2 tensors
XとYを作成したい、Tensorflowのcontrol_dependenciesメソッドを使用するには?
if
X = = Y then
印刷「はい」
ソースコード:
import tensorflow as tf
session = tf.Session()
x= tf.constant(5)
y= tf.constant(50)
with tf.control_dependencies([ tf.assert_equal(x,y)]) :
print('yup')
通常の何も表示されませんが、彼の印刷: うんそうなぜ印刷うん?