tilman151 / klay

Clean network declarations for DL4J in Kotlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Klay - Clean DL4J Network Declarations

This project, Klay (Kotlin LAYers), uses Kotlin to build a Domain-Specific Language (DSL) for defining neural networks in DL4J. It is accompanied by this blog post.

Klay uses type-safe builder functions to initialize layers of neural networks. Instead of writing this in standard DL4J syntax:

val denseLayer = DenseLayer.Builder()
                    .nIn(10)
                    .nOut(100)
                    .activation(Activation.RELU)
                    .build()

We can use this more concise form:

val denseLayer = dense {
                        nIn(10)
                        nOut(100)
                        activation(Activation.RELU)
                       }

For more information, please refere to the blog post.

This repository contains all quickstart modelling examples from the DL4J example repository. They were converted to Kotlin and demonstrate how to use Klay. Only the layers necessary for getting the examples to work are implemented. The rest is still work in progress.

About

Clean network declarations for DL4J in Kotlin

License:Apache License 2.0


Languages

Language:Kotlin 100.0%