在tensorflow一个学习代码中遇到了这样一行代码:
_, loss_value = sess.run()
想请问一下这个_,表示什么意思呢
大家讲道理2017-04-18 10:28:25
If you are in REPL, _
can represent the return value of the previous step
For example
>>> (lambda : 2)()
2
>>> _
2
PHPz2017-04-18 10:28:25
sess.run() returns two parameters, the first parameter is saved in a variable named _. If _ is printed separately, it represents the value of the latest expression
ringa_lee2017-04-18 10:28:25
means that func is supposed to return two variables, but you only want to receive the latter variable, so use _
to occupy a position to indicate that it has been received