Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/TensorFlowNET.Keras/Engine/Model.Predict.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ Tensors PredictInternal(DataHandler data_handler, int verbose)
}
else
{
batch_outputs = tf.concat(new Tensor[] { batch_outputs, tmp_batch_outputs[0] }, axis: 0);
for (int i = 0; i < batch_outputs.Length; i++)
batch_outputs[i] = tf.concat(new Tensor[] { batch_outputs[i], tmp_batch_outputs[i] }, axis: 0);
}

var end_step = step + data_handler.StepIncrement;
Expand All @@ -116,7 +117,7 @@ Tensors run_predict_step(OwnedIterator iterator)
{
var data = iterator.next();
var outputs = predict_step(data);
tf_with(ops.control_dependencies(new object[0]), ctl => _predict_counter.assign_add(1));
tf_with(ops.control_dependencies(Array.Empty<object>()), ctl => _predict_counter.assign_add(1));
return outputs;
}

Expand Down