com.kotlinnlp:simplednn

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.

License

License

Categories

Categories

Kotlin Languages
GroupId

GroupId

com.kotlinnlp
ArtifactId

ArtifactId

simplednn
Last Version

Last Version

0.14.0
Release Date

Release Date

Type

Type

jar
Description

Description

com.kotlinnlp:simplednn
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.
Project URL

Project URL

http://github.com/kotlinnlp/simplednn
Source Code Management

Source Code Management

http://github.com/kotlinnlp/simplednn/tree/master

Download simplednn

How to add to project

<!-- https://jarcasting.com/artifacts/com.kotlinnlp/simplednn/ -->
<dependency>
    <groupId>com.kotlinnlp</groupId>
    <artifactId>simplednn</artifactId>
    <version>0.14.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.kotlinnlp/simplednn/
implementation 'com.kotlinnlp:simplednn:0.14.0'
// https://jarcasting.com/artifacts/com.kotlinnlp/simplednn/
implementation ("com.kotlinnlp:simplednn:0.14.0")
'com.kotlinnlp:simplednn:jar:0.14.0'
<dependency org="com.kotlinnlp" name="simplednn" rev="0.14.0">
  <artifact name="simplednn" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.kotlinnlp', module='simplednn', version='0.14.0')
)
libraryDependencies += "com.kotlinnlp" % "simplednn" % "0.14.0"
[com.kotlinnlp/simplednn "0.14.0"]

Dependencies

compile (8)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.31
org.jetbrains.kotlin : kotlin-reflect jar 1.3.31
org.jblas : jblas jar 1.2.4
org.slf4j : slf4j-simple jar 1.7.21
com.nhaarman : mockito-kotlin jar 1.5.0
org.spekframework.spek2 : spek-dsl-jvm pom 2.0.5
org.spekframework.spek2 : spek-runner-junit5 jar 2.0.5
com.kotlinnlp : utils jar 2.1.4

test (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-test jar 1.3.31

Project Modules

There are no modules declared in this project.

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.

Versions

Version
0.14.0
0.13.2
0.13.1
0.13.0
0.12.0
0.11.2
0.11.1
0.11.0
0.10.0
0.9.3
0.9.2
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.0
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0