这样就会出错,原因在于函数返回为三个变量,若直接向写入函数那样运用sess.run()得到,就会导致错误。
sess=tf.Session()
sess.run(tf.initialize_all_variables())
b,bb,bbb=sess.run(darknet53(image_label))
print(b.shape)
print(bb.shape)
print(bbb.shape)
错误的做法:
a,aa,aaa=darknet53(image_label)
sess=tf.Session()
sess.run(tf.initialize_all_variables())
b=sess.run(a)
bb=sess.run(aa)
bbb=sess.run(aaa)
print(b.shape)
print(bb.shape)
print(bbb.shape)
正确的做法: