【发布时间】:2017-04-21 01:06:21
【问题描述】:
在tensorflow MNIST tutorial 中,mnist.train.next_batch(100) 函数非常方便。我现在正在尝试自己实现一个简单的分类。我在一个 numpy 数组中有我的训练数据。我怎样才能为我自己的数据实现类似的功能来给我下一批?
sess = tf.InteractiveSession()
tf.global_variables_initializer().run()
Xtr, Ytr = loadData()
for it in range(1000):
batch_x = Xtr.next_batch(100)
batch_y = Ytr.next_batch(100)
【问题讨论】:
标签: python numpy neural-network tensorflow classification