GithubHelp home page GithubHelp logo

kawatan / merkurius Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 98.47 MB

Portable Deep Learning Library for .NET

License: Apache License 2.0

C# 100.00%
ai-framework c-sharp dotnet dotnet-standard dotnet-core deep-learning machine-learning neural-networks

merkurius's Introduction

Merkurius

This repository contains the portable deep learning (deep neural networks) library implementation for .NET platform. This library supports inference and training. Furthermore, all codes are written in C#.

Installation

You can install the Merkurius NuGet package from the .NET Core CLI command.

> dotnet add package Merkurius

or from the NuGet package manager.

PM> Install-Package Merkurius

Build

To build Merkurius, run .NET Core CLI command.

> dotnet build Merkurius.csproj

Examples

Convolutional neural network (CNN).

var model = new Model(
  new Convolution(ch, iw, ih, f, fw, fh, (fanIn, fanOut) => Initializers.HeNormal(fanIn),
  new Activation(new ReLU(),
  new MaxPooling(f, mw, mh, pw, ph,
  new FullyConnected(f * ow * oh, (fanIn, fanOut) => Initializers.HeNormal(fanIn),
  new Activation(new ReLU(),
  new FullyConnected(100, 10, (fanIn, fanOut) => Initializers.GlorotNormal(fanIn, fanOut))))))));

model.Fit(trainingList, 50, 100, new Adam(), new SoftmaxCrossEntropy());

Recurrent neural network (RNN).

var model = new Model(
  new Recurrent(1, 128, 10, true, false, (fanIn, fanOut) => Initializers.LeCunNormal(fanIn),
  new FullyConnected(128, 10, (fanIn, fanOut) => Initializers.LeCunNormal(fanIn),
  new Activation(10, new Identity()))));

model.Fit(trainingList, 50, 10, new SGD(), new MeanSquaredError());

Features

  • Inference
  • Training
  • Code first modeling
  • .NET Standard 2.1 library
  • Dependency-free

Activation Functions

  • ELU (Exponential linear unit)
  • Hyperbolic tangent
  • Identity
  • ReLU (Rectified linear unit)
  • SELU (Scaled exponential linear unit)
  • Sigmoid
  • Softmax
  • SoftPlus
  • Softsign

Layers

  • Batch normalization
  • Convolution
  • Dropout
  • Embedding
  • GRU (Gated recurrent unit)
  • Fully connected
  • LSTM (Long short-term memory)
  • Max pooling
  • Recurrent

Loss Functions

  • Cross-entropy
  • Mean squared error (MSE)

Optimizers

  • AdaDelta
  • AdaGrad
  • Adam
  • Momentum
  • Nesterov
  • RMSprop
  • SGD

merkurius's People

Contributors

kawatan avatar milchchan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.