SimpleDNN is a machine learning lightweight open-source library written in Kotlin designed to support relevant neural network architectures in natural language processing tasks

Overview

SimpleDNN Maven Central Build Status

SimpleDNN is a machine learning lightweight open-source library written in Kotlin whose purpose is to support the development of feed-forward and recurrent Artificial Neural Networks.

SimpleDNN is part of KotlinNLP and has been designed to support relevant neural network architectures in natural language processing tasks such as pos-tagging, syntactic parsing and named-entity recognition.

As it is written in Kotlin it is interoperable with other JVM languages (e.g. Java and Scala). Mathematical operations within the library are performed with jblas. Different libraries can be used instead, although during our experiments it proved to be the fastest. The effort required is minimum as the essential mathematical functions are wrapped in a single package and fully tested — saving you valuable time.

Note

SimpleDNN does not use the computational graph model and does not perform automatic differentiation of functions.

In case you are looking for state-of-the-art technology to create sophisticated flexible network architectures, you should consider the following libraries:
PyTorch, DyNet,
Keras, TensorFlow and Deeplearning4j

If instead a simpler yet well structured neural network almost ready to use is what you need, then you are in the right place!

Introduction

Building a basic Neural Network with SimpleDNN does not require much more effort than just configuring a stack of layers, with one input layer, any number of hidden layers, and one output layer:

/**
  * Create a fully connected neural network with an input layer with dropout,
  * two hidden layers with ELU activation function and an output one with 
  * Softmax activation for classification purpose.
  */
val network = StackedLayersParameters(
    LayerInterface( // input layer
        size = 784, 
        dropout = 0.25),
    LayerInterface( // first hidden layer
        size = 100,
        activationFunction = ELU(),
        connectionType = LayerType.Connection.Feedforward),
    LayerInterface( // second hidden layer
        size = 100, 
        ctivationFunction = ELU(),
        connectionType = LayerType.Connection.Feedforward),
    LayerInterface( // output layer
        size = 10,
        activationFunction = Softmax(),
        connectionType = LayerType.Connection.Feedforward))

Getting Started

Import with Maven

<dependency>
    <groupId>com.kotlinnlp</groupId>
    <artifactId>simplednn</artifactId>
    <version>0.14.0</version>
</dependency>

Examples

Try some examples of usage of SimpleDNN running the files in the examples folder.

To make the examples working download the datasets here, then set their paths copying the file example/config/configuration.yml.example to example/config/configuration.yml and editing it properly.

License

This software is released under the terms of the Mozilla Public License, v. 2.0

Contributions

We greatly appreciate any bug reports and contributions, which can be made by filing an issue or making a pull request through the github page.

You might also like...
Exploring Kotlin Symbol Processing - KSP. This is just an experiment.

KSP example Exploring Kotlin Symbol Processing - KSP. This is just an experiment. Project contains 2 modules Processing Example Processing module is t

Kotlin Symbol Processing (KSP) sample project

Kotlin Symbol Processing (KSP) Sample Project Sample annotation processor created with Kotlin Symbol Processing (KSP) API. The repository supplements

KotlinDL - High-level Deep Learning Framework written in Kotlin and inspired by Keras

Оригинальный репозиторий https://github.com/JetBrains/KotlinDL KotlinDL: High-le

an open source algorithmic trading framework written in Kotlin for anyone serious about algo-trading
an open source algorithmic trading framework written in Kotlin for anyone serious about algo-trading

Roboquant Roboquant is an algorithmic trading platform that is fast and flexible while at the same time strives to be easy to use. It is fully open so

Image Processing Engine with GUI
Image Processing Engine with GUI

Image Processing Engine with GUI Imperial College London Department of Computing Third Year Software Engineer Group Project Supervisor: Dr. Pancham Sh

Simplify the processing of sealed class/interface

shiirudo Generates DSL to simplify processing branching by when expressions in sealed class/interface. Setup Refer to the KSP quickstart guide to make

A showcase music app for Android entirely written using Kotlin language

Bandhook Kotlin This project is a small replica of the app I developed some time ago. Bandhook can still be found on Play Store At the moment it will

Archimedes's implementation for the Java Virtual Machine (JVM)

Archimedes Give me a place to stand, and I shall move the earth. Archimedes's implementation for the Java Virtual Machine (JVM) Building From Source T

Run Linux virtual machine on Android OS. Powered by QEMU. No KVM or root required.
Run Linux virtual machine on Android OS. Powered by QEMU. No KVM or root required.

vmConsole A free and open-source application that enables you to run Alpine Linux distribution in a virtual machine on your Android device. Thousands

Comments
Owner
KotlinNLP
Natural Language Processing in Kotlin
KotlinNLP
A clean-aesthetically pleasing Measuring Application, which uses relevant sensors-converts raw sensor data into human readable formatted outputs-and displays accurate measurements.

Measure App A clean-aesthetically pleasing Measuring Application, which uses relevant sensors-converts raw sensor data into human readable formatted o

ACM Student Chapter, PESU ECC 1 Oct 15, 2021
This lib is the framework for dependency tasks, specially for the asynchronous tasks.

DependencyTask This lib is the framework for dependency tasks, specially for the asynchronous tasks. Backgroud Image that there is a progress with som

null 1 May 6, 2022
A project to learn about Reactive Microservices experimenting with architectures and patterns

reactive-microservices-workshop Copyright © 2021 Aleix Morgadas - Licenced under CC BY-SA 4.0 A project to learn about Reactive Microservices experime

Aleix Morgadas 7 Feb 21, 2022
Open-Source Forge 1.8.9 Hypixel Duels bot! Planned to support many modes and written in Kotlin.

This project has been moved to a new repository: [HumanDuck23/duck-dueller-v2](https://github.com/HumanDuck23/duck-dueller-v2) Duck Dueller Are you ti

null 2 Aug 29, 2022
XliteKt is an open-source, and forever open-source Kotlin based OSRS Emulator for educational purposes.

xlitekt Introduction XliteKt is an open-source, and forever open-source Kotlin based OSRS Emulator for educational purposes. Currently built around th

Runetopic 6 Dec 16, 2022
Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP)

Mockative Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP). Installation Mockative uses KSP to generate

Mockative 121 Dec 26, 2022
Muhammad Valian Masdani 2 Jul 5, 2022
BindsAdapter is an Android library to help you create and maintain Adapter class easier via ksp( Kotlin Symbol Processing).

BindsAdapter BindsAdapter is an Android library to help you create and maintain Adapter class easier via ksp( Kotlin Symbol Processing). Installation

Jintin 5 Jul 30, 2022
An Interpreter/Transpiler for the Folders esoteric programming language, a language with no code and just folders

Folders2kt ?? An Interpreter/Transpiler of the Folders esoteric programming language, a language with no code and just folders, written in Kotlin Show

Jens Klingenberg 18 Jan 4, 2023
XCore is a Open-Source , simple and lightweight API & Template for Android Apps.

XCore XCore is a Open-Source , simple and lightweight API & Template for Android Apps. Support XCore is compatible with Android Studio & Sketchware Pr

TherionRO 3 Dec 2, 2022