CntkProtoSharp 0.1.0

dotnet add package CntkProtoSharp --version 0.1.0
NuGet\Install-Package CntkProtoSharp -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CntkProtoSharp" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CntkProtoSharp --version 0.1.0
#r "nuget: CntkProtoSharp, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CntkProtoSharp as a Cake Addin
#addin nuget:?package=CntkProtoSharp&version=0.1.0

// Install CntkProtoSharp as a Cake Tool
#tool nuget:?package=CntkProtoSharp&version=0.1.0

Build and test Stars License

What Links and Status
CntkProtoSharp NuGet Downloads

CntkProtoSharp library

CNTK model V2 protobuf format parsing and manipulation in C#.

Quick Guide

Install latest version of .NET:

Code

What How
Install dotnet add PROJECT.csproj package CntkProtoSharp
Parse var model = Dictionary.Parser.ParseFromFile("ResNet20_CIFAR10_CNTK.cntk.model");
Write model.WriteToFile("ResNet20_CIFAR10_CNTK_TEST.cntk.model");
Write as JSON model.WriteJsonToFile("ResNet20_CIFAR10_CNTK_TEST.cntk.json");

Source Code

Base functionality is based on https://github.com/nietras/CNTK/blob/master/Source/CNTKv2LibraryDll/proto/CNTK.proto:

.\protoc.exe .\CNTK.proto --csharp_out=CntkProtoSharp

Everything else written in beautiful C# as extensions to this.

Example Code

using CNTK.Proto;
using CNTK.Proto.Test;

// Examples see https://github.com/microsoft/CNTK/blob/master/PretrainedModels/Image.md
var inputFilePath = @"ResNet20_CIFAR10_CNTK.cntk.model";

var model = Dictionary.Parser.ParseFromFile(inputFilePath);

var data = model.Data;

model.WriteToFile(@"ResNet20_CIFAR10_CNTK_TEST.cntk.model");
model.WriteIndentedJsonToFile(@"ResNet20_CIFAR10_CNTK_TEST.cntk.json");
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.0 181 2/14/2023