我正在使用来自 Google 的 Tensorflow 的示例。我能够很好地运行它,但训练似乎并没有停止,因为它有一个while True:
循环。参考:
translate.py
考进train()
:
while True:
# Choose a bucket according to data distribution. We pick a random number
# in [0, 1] and use the corresponding interval in train_buckets_scale.
random_number_01 = np.random.random_sample()
bucket_id = min([i for i in xrange(len(train_buckets_scale))
if train_buckets_scale[i] > random_number_01])
....