8000 Fix IO Exception from keras.fit. · SciSharp/TensorFlow.NET@10f66f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10f66f0

Browse files
AsakusaRinneOceania2018
authored andcommitted
Fix IO Exception from keras.fit.
1 parent def0664 commit 10f66f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/TensorFlowNET.Keras/Engine/Model.Fit.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ void on_train_batch_begin(int verbose, long step, long elapse, IEnumerable<(stri
137137
remaining += ".";
138138

139139
Binding.tf_output_redirect.Write($"{step + 1:D4}/{data_handler.Inferredsteps:D4} [{progress}{remaining}] - {elapse}ms/step {result_pairs}");
140-
Console.CursorLeft = 0;
140+
if (!Console.IsOutputRedirected)
141+
{
142+
Console.CursorLeft = 0;
143+
}
141144
}
142145
}
143146
}

0 commit comments

Comments
 (0)
0