Skip to content

Conversation

@marcusturewicz
Copy link
Contributor

Description:
Adds a concrete C# sample/tutorial

Motivation and Context
Fixes #4709

@marcusturewicz marcusturewicz requested a review from a team as a code owner August 6, 2020 06:51
@ghost
Copy link

ghost commented Aug 6, 2020

CLA assistant check
All CLA requirements met.

@liqunfu liqunfu added the api:C# label Aug 6, 2020

// Run inference
using var session = new InferenceSession(modelFilePath);
using IDisposableReadOnlyCollection<DisposableNamedOnnxValue> results = session.Run(inputs);
Copy link
Member

@yuslepukhin yuslepukhin Aug 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you don't use the alternative synax for the using directive just yet.

using(var session = new InferenceSession(modelFilePath))
using(var results = session.Run(inputs))
{
// Put the rest of the function here so both session and results are still alive until the end of the scope.

}

@@ -0,0 +1,169 @@
# C# Sample: ResNet50 v2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for such a clear and detailed readme!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! 😊

Copy link
Member

@yuslepukhin yuslepukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@skottmckay skottmckay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@skottmckay
Copy link
Contributor

/azp run Linux CPU CI Pipeline,Linux CPU x64 NoContribops CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,MacOS CI Pipeline,MacOS NoContribops CI Pipeline,Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline

@skottmckay
Copy link
Contributor

/azp run orttraining-linux-ci-pipeline,orttraining-mac-ci-pipeline,orttraining-linux-gpu-ci-pipeline,Linux OpenVINO CI Pipeline,centos7_cpu

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 9 pipeline(s).

@marcusturewicz
Copy link
Contributor Author

CI failures look unrelated..?

@yuslepukhin yuslepukhin merged commit 37c45c3 into microsoft:master Aug 7, 2020
@marcusturewicz marcusturewicz deleted the csharp-sample-resnet50 branch August 7, 2020 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concrete C# samples

4 participants