Skip to content

Commit 765e722

Browse files
committed
fix progress bar counts
1 parent b164b8e commit 765e722

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tensordiffeq/fit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def fit(obj, tf_iter=0, newton_iter=0, batch_sz=None, newton_eager=True):
4242
for epoch in t:
4343
loss_value = train_op_fn(n_batches, obj)
4444
# Description will be displayed on the left
45-
t.set_description('Adam epoch %i' % epoch)
45+
t.set_description('Adam epoch %i' % (epoch+1))
4646
# Postfix will be displayed on the right,
4747
# formatted automatically based on argument's datatype
4848
if epoch % 10 == 0:

tensordiffeq/optimizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def eager_lbfgs(opfunc, x, state, maxIter=100, learningRate=1, do_verbose=True):
272272
print('function value changing less than tolX' + str(tf.abs(f - f_old)))
273273
break
274274

275-
t_.set_description('L-BFGS epoch %i' % epoch)
275+
t_.set_description('L-BFGS epoch %i' % (epoch+1))
276276
if do_verbose:
277277
if nIter % 10 == 0:
278278
t_.set_postfix(loss=f.numpy())

0 commit comments

Comments
 (0)