Skip to content

Commit

Permalink
reverted accidental test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgsharp committed Mar 3, 2021
1 parent 63dabbc commit d251bb5
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1226,13 +1226,11 @@ public void TensorFlowSentimentClassificationTest()
// For explanation on how was the `sentiment_model` created
// c.f. https://github.com/dotnet/machinelearning-testdata/blob/master/Microsoft.ML.TensorFlow.TestModels/sentiment_model/README.md
string modelLocation = @"sentiment_model";
using var pipelineModel = _mlContext.Model.LoadTensorFlowModel(modelLocation, false).ScoreTensorFlowModel(new[] { "Prediction/Softmax" }, new[] { "Features" })
using var pipelineModel = _mlContext.Model.LoadTensorFlowModel(modelLocation).ScoreTensorFlowModel(new[] { "Prediction/Softmax" }, new[] { "Features" })
.Append(_mlContext.Transforms.CopyColumns("Prediction", "Prediction/Softmax"))
.Fit(dataView);
using var tfEnginePipe = _mlContext.Model.CreatePredictionEngine<TensorFlowSentiment, TensorFlowSentiment>(pipelineModel);

var schema = pipelineModel.GetOutputSchema(dataView.Schema);

var processedData = dataPipe.Predict(data[0]);
Array.Resize(ref processedData.Features, 600);
var prediction = tfEnginePipe.Predict(processedData);
Expand Down

0 comments on commit d251bb5

Please sign in to comment.