Skip to content

Commit 900d45c

Browse files
committed
add more info for debug
1 parent bf53773 commit 900d45c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/TensorFlowNET.Examples/TextProcess/TextClassificationTrain.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ protected virtual bool RunWithImportedGraph(Session sess, Graph graph)
9595
//_, step, loss = sess.run([model.optimizer, model.global_step, model.loss], feed_dict = train_feed_dict)
9696
var result = sess.run(new ITensorOrOperation[] { optimizer, global_step, loss }, train_feed_dict);
9797
loss_value = result[2];
98-
var step = result[1];
99-
if (step % 10 == 0)
98+
var step = (int)result[1];
99+
if (step % 10 == 0 || step < 10)
100100
{
101101
var estimate = TimeSpan.FromSeconds((stopwatch.Elapsed.TotalSeconds / i) * total);
102102
Console.WriteLine($"Training on batch {i}/{total}. Estimated training time: {estimate}");
103-
Console.WriteLine($"Step {step} loss: {result[2]}");
103+
Console.WriteLine($"Step {step} loss: {loss_value}");
104104
}
105105

106106
if (step % 100 == 0)

0 commit comments

Comments
 (0)