擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>epoch, step, d_train_feed_dict, g_train_feed_dict = next(inf_data_gen)
</code></pre>
<p>看这个:<a href="https://stackoverflow.com/questions/12274606/theres-no-next-function-in-a-yield-generator-in-python-3">there's no next() function in a yield generator in python 3</a></p>
<p>在python3中,需要使用<code>next()</code>而不是<code>.next()</code>。你知道吗</p>
<p>Dillon Davis建议:您也可以使用<code>.__next__()</code>,尽管<code>.next()</code>更好。你知道吗</p>