tensorflow run()和 eval()

eval()只能用于tf.Tensor类对象,也就是有输出的Operation。对于没有输出的Operation, 可以用.run()或者Session.run()

所以我们训练的时候,对于优化器只能使用后者.而对于predict就只能使用前者.

原文地址:https://www.cnblogs.com/mengxiangtiankongfenwailan/p/10831518.html