A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gafter/diffkt below:

gafter/diffkt: A framework for automatic differentiation in Kotlin

DiffKt - A Differentiable Programming Framework for Kotlin

DiffKt is a general-purpose, functional, differentiable programming framework for Kotlin. It can automatically differentiate through functions of tensors, scalars, and user-defined types. It supports forward-mode and reverse-mode differentiation including Jacobian-vector and vector-Jacobian products, which can be composed for higher-order differentiation. It also supports differentiating against user-defined types using interfaces.

DiffKt also includes an early integration of ShapeTyping, an extensible compiler plugin for ahead-of-time tensor shape verification and inspection. With the ShapeTyping IntelliJ IDE plugin, users can even inspect tensor shapes and see tensor shape errors while in active development.

Currently there are two implementations that are supported for DiffKt. Follow the links below to install dependencies. It is recommended to use Homebrew as a package manager for macOS.

Fast Ops

GPU Ops

To use DiffKt, use the following dependency to your build.gradle.kts file with the x.y.z version number.

dependencies {
    implementation("com.facebook.diffkt:x.y.z")
}

To use ShapeTyping, apply the plugin to your build.gradle.kts file

plugins {
   id("TODO")
   ...
}

And add the following dependencies

dependencies {
    implementation("TODO")
    implementation("TODO")
    ...
}

TODO: Instructions on downloading the IntelliJ

For more detailed instructions, please visit the ShapeTyping repository here. (TODO: link repository)

Currently DiffKt building is supported on macOS as well as Ubuntu. Help is needed to support building on Windows. Build instructions can be found below:

Install on Mac

Install on Ubuntu

To build DiffKt from source files for UBUNTU, read INSTALL_UBUNTU.md

Navigate to the kotlin folder from the repository root.

To run an example from the examples folder, use the command ./gradlew :examples:run -Ppackage=<package-name>. For instance, ./gradlew :examples:run -Ppackage=vector2 will run the vector2 example.

Navigate to the kotlin folder from the repository root.

All tests should be run with the command ./gradlew test

To run specific tests, use the command ./gradlew :<subproject-name>:test --tests "<test-name>". For example, ./gradlew :api:test --tests "ReluTest".

Here are some tutorials to help you get started.

Intro to Differentiable Programming

Indexing

Broadcasting

Data Science and Machine Learning

Simple Parabola Gradient Descent

Linear Regression w/ Gradient Descent

3D Nonlinear Regression

Multivariable Linear Regression

Logistic Regression w/ Gradient Descent

Normal Distribution MLE

Exponential Distribution MLE

Neural Network w/ Backpropagation

Mass Spring

User-Defined Types

Linear Regression w/ User-Defined Types

Neural Network w/ User-Defined Types

We welcome and greatly value all kinds of contributions to DiffKt. If you would like to contribute, please see our Contributing Guidelines. Please refer to the contributing document or DiffKt.org for more details.

DiffKt is MIT licensed.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4