Giter Site home page Giter Site logo

mnisttensorcntk's Introduction

MNIST for ML Beginners using C#

This sample is a very simple WPF application which recognizes hand-written digits using the pre-built MNIST convolutional model. The MNIST problem is Machine Learning's Hello World program.

MNIST is a simple computer vision dataset which consists of hand written digits like as shown below.

MNIST

This tutorial comes with a pre-built CNTK model which is trained to look at these hand-written digits and predict what these digits are.

CNTK is a deep learning library in which this model is built in. For now, we will just basically load this model as a resource into your .NET application and evaluate on it. Follow the steps below to get going.

Get Started

Step 1: Download and Install

If you are new to .NET, go ahead and download Visual Studio 2017 and select only the '.NET desktop development' section as shown below.

workload install

Step 2: Download MNIST tutorial code

Clone or download this github repo. Open up the MNIST solution (MNIST.sln) file in Visual Studio 2017.                 workload install

Step 3: Understand Solution Structure

This solution consits of two projects 'Digitz' (C# project building a windows app using the CNTK pre-built MNIST model) and 'Training' (Python project, which generates the MNIST model using CNTK). Don't worry about the Python project for now.

 workload install  

Step 4: Configure and build your Project for Launch

Set the start-up project to be 'Digitz' project as shown below and then go ahead and build your application by using the right-click 'build' option.

startupproject

Step 5: Launch MNIST application

Launch the app by clicking the green start button at the top or F5 on your keyboard. Draw out a hand-written digit and click 'Recognize' to see if this works for you!

app running

Congrats! you have just completed the helloworld program for Machine Learning.

TL;DR

The sample provides you an example of how you can use Machine Learning and AI in your .NET apps today. The sample basically loads the pre-built model 'digit.model' and takes the bitmap image that user draws out, converts that into an optimized multi-dimensional exchange type Tensor and then calls CNTK evaluate method to evaluate on the model.

The evaluate method from CNTK returns a list of floats (0 - 9) predicting the confidence for each of these digits. The highest confidence digit is then displayed in the app.

This sample also introduces Tensor, Tensor is an exchange type for homogenous multi-dimensional data for 1 to N dimensions. The motivation behind introducing Tensor is to make it easy for Machine Learning library vendors like CNTK, Tensorflow, Caffe, Scikit-Learn to port their libraries over to .NET with minimal dependencies in place.  Tensor is designed to provide the following characteristics.

To learn more about Tensor follow our blog post and GitHub repo.

To follow a video tutorial on this app being used you can also follow this video. https://channel9.msdn.com/Events/Connect/2017/t126

mnisttensorcntk's People

Contributors

asthana86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mnisttensorcntk's Issues

Unknown Subtype: {E2A2EEF0-14BE-4BFE-B65C-5669125F62A7}

When I trying to open project in VS I receive next error:

The project file 'D:\tmp\MNISTTensorCNTK-master\MNISTTensorCNTK-master\Training\Training.pyproj' cannot be opened.

There is a missing project subtype.
Subtype: '{E2A2EEF0-14BE-4BFE-B65C-5669125F62A7}' is unsupported by this installation.

I installed all stuff related Python but still same.
Even trying to remove this guid from types in Training.pyproj but looks like VS automatically adds it back, because of error still same

Model training

How was the digit.model created ? Is it possible to train and optimize the model ?

Error

缺少一个项目子类型。
子类型: 此安装不支持“{E2A2EEF0-14BE-4BFE-B65C-5669125F62A7}”。

Python Project Fails to Load in Visual Studio

loadfailed

I attempted to download and build the MNISTTensorCNTK solution.

I am unfamiliar with using Python in Visual Studio. The Python project within this solution says "Load Failed", and when I try to reload the project, a popup says there is a missing project subtype

Googling the missing subtype was unsuccessful.

I've tried 2 separate computers, and I've tried repair installation, and adding/modifying Python in
errormessage
Visual Studio.

Please advise on possible solutions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.