Skip to content

OnnxTransformer docs xml code sample should use latest dynamic API #4707

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

Closed
najeeb-kazmi opened this issue Jan 24, 2020 · 0 comments
Closed
Labels
documentation Related to documentation of ML.NET P3 Doc bugs, questions, minor issues, etc.

Comments

@najeeb-kazmi
Copy link
Member

It currently uses the old static API

var data = TextLoader.CreateLoader(env, ctx => (
imagePath: ctx.LoadText(0),
name: ctx.LoadText(1)))
.Read(new MultiFileSource(dataFile));
var pipe = data.MakeNewEstimator()
.Append(row => (
row.name,
data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true)))
.Append(row => (row.name, softmaxout_1: row.data_0.ApplyOnnxModel(modelFile)));
TestEstimatorCore(pipe.AsDynamic, data.AsDynamic);
var result = pipe.Fit(data).Transform(data).AsDynamic;

@najeeb-kazmi najeeb-kazmi added documentation Related to documentation of ML.NET P3 Doc bugs, questions, minor issues, etc. labels Jan 24, 2020
@harishsk harishsk closed this as completed Jun 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Related to documentation of ML.NET P3 Doc bugs, questions, minor issues, etc.
Projects
None yet
Development

No branches or pull requests

2 participants