小编Dan*_*Dan的帖子

TensorFlow教程batch_xs中的next_batch,batch_ys = mnist.train.next_batch(100)来自哪里?

我正在尝试TensorFlow教程并且不明白这行中的next_batch来自哪里?

 batch_xs, batch_ys = mnist.train.next_batch(100)
Run Code Online (Sandbox Code Playgroud)

我在看

from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
Run Code Online (Sandbox Code Playgroud)

并没有看到next_batch那里.

现在,在我自己的代码中尝试next_batch时,我得到了

AttributeError: 'numpy.ndarray' object has no attribute 'next_batch'
Run Code Online (Sandbox Code Playgroud)

所以我想了解next_batch来自哪里?

python numpy tensorflow

14
推荐指数
2
解决办法
3万
查看次数

为什么在 plt.subplot(211) 中使用 211

在我看到的 pyplot 文档中

plt.subplt(211) 与 subplot(2, 1, 1) 相同

我还看到 211 在其他地方使用。为什么特别使用这些数字而不是其他数字?

python matplotlib

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×2

matplotlib ×1

numpy ×1

tensorflow ×1