Git Product home page Git Product logo

sianet's Introduction

Join the chat at https://gitter.im/publiclab/publiclab Build status Build Status Backers on Open Collective Sponsors on Open Collective

Trello is used to track SiaNet devlopment activities. You are welcome to watch any task and track progress. Suggestion will be put on the wishlist and then will be planned out for development

https://trello.com/b/bLbgQLgy/sianet-development

A C# deep learning library

Developing a C# wrapper to help developer easily create and train deep neural network models.

  • Easy to use library, just focus on research
  • Multiple backend - CNTK, TensorFlow, MxNet, PyTorch, ArrayFire
  • CUDA/ OpenCL support for some of the backends
  • Light weight libray, built with .NET standard 2.0
  • Code well structured, easy to extend if you would like to extend with new layer, loss, metrics, optimizers, constraints, regularizer

A Basic example

The below is a classification example with Titanic dataset. Able to reach 75% accuracy within 10 epoch.

//Setup Engine. If using TensorSharp then pass SiaNet.Backend.TensorSharp.SiaNetBackend.Instance. 
//Once other backend is ready you will be able to use CNTK, TensorFlow and MxNet as well.
Global.UseEngine(SiaNet.Backend.ArrayFire.SiaNetBackend.Instance, DeviceType.CPU);

var dataset = LoadTrain(); //Load train data
var test = LoadTest(); //Load test data

var (train, val) = dataset.Split(0.25);

//Build model
var model = new Sequential();
model.EpochEnd += Model_EpochEnd;
model.Add(new Dense(128, ActivationType.ReLU));
model.Add(new Dense(64, ActivationType.ReLU));
model.Add(new Dense(1, ActivationType.Sigmoid));

//Compile with Optimizer, Loss and Metric
model.Compile(OptimizerType.Adam, LossType.BinaryCrossEntropy, MetricType.BinaryAccurary);

// Train for 100 epoch with batch size of 32
model.Train(train, 100, 32, val);

var predictions = model.Predict(test);
predictions.Print();

Training Result

Figure 1-1

Complete Code: https://github.com/SciSharp/SiaNet/blob/master/Examples/BasicClassificationWithTitanicDataset/Program.cs

More examples: https://github.com/SciSharp/SiaNet/blob/master/Examples

API Docs

https://scisharp.github.io/SiaNet/

Contribution

Any help is welcome!!!

sianet's People

Contributors

deepakkumar1984 avatar falahati avatar oceania2018 avatar asood123 avatar drewnoakes avatar dragonflyeast avatar

Watchers

James Cloos avatar

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.