Skip to content

Commit

Permalink
Update src/Microsoft.ML.TensorFlow/TensorflowUtils.cs
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
  • Loading branch information
michaelgsharp and eerhardt authored Mar 2, 2021
1 parent b29b60d commit 63dabbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/TensorflowUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ internal static DataViewSchema GetModelSchema(IExceptionContext ectx, Graph grap
DataViewType columnType = new VectorDataViewType(mlType);
if (!(Utils.Size(tensorShape) == 1 && tensorShape[0] <= 0) &&
(Utils.Size(tensorShape) > 0 && tensorShape.Skip(1).All(x => x > 0)))
// When treatOutputAsBatched is true we keep the existing behaviour. This means that if the first dimension is greater
// treatOutputAsBatched == true means that if the first dimension is greater
// than 0 we take the tensor shape as is. If the first value is less then 0, we treat it as the batch input so we can
// ignore it for the shape of the ML.NET vector. I.E. if the input dimensions are [-1, 5], ML.NET will read the -1 as
// batch input, and so the ML.NET data type will be a vector of length 5.
Expand Down

0 comments on commit 63dabbc

Please sign in to comment.