From 93cd2b66a6817f5c16806ebe84537e893f5ced49 Mon Sep 17 00:00:00 2001 From: Kevin Hjelden Date: Wed, 10 May 2023 12:58:38 -0700 Subject: [PATCH] fix: predict with multiple outputs --- src/TensorFlowNET.Keras/Engine/Model.Predict.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Keras/Engine/Model.Predict.cs b/src/TensorFlowNET.Keras/Engine/Model.Predict.cs index 984bcb5dc..fc8d784ca 100644 --- a/src/TensorFlowNET.Keras/Engine/Model.Predict.cs +++ b/src/TensorFlowNET.Keras/Engine/Model.Predict.cs @@ -84,7 +84,7 @@ Tensors PredictInternal(DataHandler data_handler, int verbose) Steps = data_handler.Inferredsteps }); - Tensor batch_outputs = null; + Tensors batch_outputs = null; _predict_counter.assign(0); callbacks.on_predict_begin(); foreach (var (epoch, iterator) in data_handler.enumerate_epochs()) @@ -95,7 +95,7 @@ Tensors PredictInternal(DataHandler data_handler, int verbose) var tmp_batch_outputs = run_predict_step(iterator); if (batch_outputs == null) { - batch_outputs = tmp_batch_outputs[0]; + batch_outputs = tmp_batch_outputs; } else {