Skip to content

Updated documentation for TensorFlowTransform #1077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 27, 2018
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
31 changes: 16 additions & 15 deletions src/Microsoft.ML.TensorFlow/doc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@
</summary>
<remarks>
<para>
The TensorflowTransform extracts the specified outputs from the operations computed on the graph (given the input(s)) using a pre-trained <a href="https://www.tensorflow.org">Tensorflow</a> model.
The transform takes as input the Tensorflow model together with the names of the inputs to the model and names of the operations for which output values will be extracted from the model.
The TensorFlowTransform extracts specified outputs using a pre-trained <a href="https://www.tensorflow.org">Tensorflow</a> model.
The transform takes as inputs the pre-trained Tensorflow model, the names of the input nodes, and names of the output nodes whose values we want to extract.
</para>

<para>
This transform requires the <a href="https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.ML.TensorFlow/0.5.0-preview-26830-5">Microsoft.ML.TensorFlow</a> nuget to be installed.
The TensorflowTransform has following assumptions regarding the input, output and processing of data.
This transform requires the <a href="https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.ML.TensorFlow">Microsoft.ML.TensorFlow</a> nuget to be installed.
The TensorFlowTransform has the following assumptions regarding input, output and processing of data.
</para>
<list type="number">
<item>
<description>
The transform currently accepts the <a href="https://www.tensorflow.org/mobile/prepare_models">frozen TensorFlow model</a> file as input.
For the input model, currently the TensorFlowTransform supports both the <a href="https://www.tensorflow.org/mobile/prepare_models">Frozen model</a> format and also the <a href="https://www.tensorflow.org/guide/saved_model#build_and_load_a_savedmodel">SavedModel</a> format.
</description>
</item>
<item>
<description>The transform supports scoring only one example at a time.</description>
</item>
<item>
<description>The name of input column(s) should match the name of input(s) in Tensorflow model.</description>
<description>The name of input column(s) should match the name of input(s) in TensorFlow model.</description>
</item>
<item>
<description>The name of each output column should match one of the operations in the Tensorflow graph.</description>
<description>The name of each output column should match one of the operations in the TensorFlow graph.</description>
</item>
<item>
<description>Currently, float and double are the only acceptable data types for input/output.</description>
</item>
<item>
Upon success, the transform will introduce a new column in <see cref="IDataView"/> corresponding to each output column specified.
<description>Upon success, the transform will introduce a new column in <see cref="IDataView"/> corresponding to each output column specified.</description>
</item>
</list>

Expand All @@ -50,16 +50,16 @@
pipeline.Add(new ColumnCopier(("NumericImageVec", "Input");
pipeline.Add(new TensorFlowScorer()
{
ModelFile = model_location;
InputColumns = new []{ "Input" };
OutputColumns = "Output"
Model = model_location;
InputColumns = new[] { "Input" };
OutputColumns = new[] { "Output" };
}
</code>
</example>
<example>
<code language="csharp">
var pipeline = new LearningPipeline(seed: 1);
pipeline.Add(new TextLoader(dataFile).CreateFrom&lt;CifarData&gt;(useHeader: false));
var pipeline = new Legacy.LearningPipeline(seed: 1);
pipeline.Add(new Microsoft.ML.Legacy.Data.TextLoader(dataFile).CreateFrom&lt;CifarData&gt;(useHeader: false));
pipeline.Add(new ImageLoader(("ImagePath", "ImageReal"))
{
ImageFolder = imageFolder
Expand All @@ -80,10 +80,11 @@

pipeline.Add(new TensorFlowScorer()
{
ModelFile = model_location,
Model = model_location,
InputColumns = new[] { "Input" },
OutputColumns = "Output"
OutputColumns = new[] { "Output" }
});

</code>
</example>
</member>
Expand Down