Tensors and neural networks in Haskell

Overview

Hasktorch

Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C++ libraries shared by PyTorch.

This project is in active development, so expect changes to the library API as it evolves. We would like to invite new users to join our Hasktorch slack space for questions and discussions. Contributions/PR are encouraged.

Currently we are developing the second major release of Hasktorch (0.2). Note the 1st release, Hasktorch 0.1, on hackage is outdated and should not be used.

Documentation

The documentation is divided into several sections:

Introductory Videos

Getting Started

The following steps will get you started. They assume the hasktorch repository has just been cloned. After setup is done, read the online tutorials and API documents.

linux+cabal+cpu

Starting from the top-level directory of the project, run:

$ pushd deps       # Change to the deps directory and save the current directory.
$ ./get-deps.sh    # Run the shell script to retrieve the libtorch dependencies.
$ popd             # Go back to the root directory of the project.
$ source setenv    # Set the shell environment to reference the shared library locations.
$ ./setup-cabal.sh # Create a cabal project file

To build and test the Hasktorch library, run:

$ cabal build hasktorch  # Build the Hasktorch library.
$ cabal test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ cabal build examples  # Build the Hasktorch examples.
$ cabal test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE=cpu             # Set device to CPU for the MNIST CNN example.
$ cabal run static-mnist-cnn    # Run the MNIST CNN example.

linux+cabal+cuda11

Starting from the top-level directory of the project, run:

$ pushd deps              # Change to the deps directory and save the current directory.
$ ./get-deps.sh -a cu111  # Run the shell script to retrieve the libtorch dependencies.
$ popd                    # Go back to the root directory of the project.
$ source setenv           # Set the shell environment to reference the shared library locations.
$ ./setup-cabal.sh        # Create a cabal project file

To build and test the Hasktorch library, run:

$ cabal build hasktorch  # Build the Hasktorch library.
$ cabal test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ cabal build examples  # Build the Hasktorch examples.
$ cabal test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE="cuda:0"        # Set device to CUDA for the MNIST CNN example.
$ cabal run static-mnist-cnn    # Run the MNIST CNN example.

macos+cabal+cpu

Starting from the top-level directory of the project, run:

$ pushd deps       # Change to the deps directory and save the current directory.
$ ./get-deps.sh    # Run the shell script to retrieve the libtorch dependencies.
$ popd             # Go back to the root directory of the project.
$ source setenv    # Set the shell environment to reference the shared library locations.
$ ./setup-cabal.sh # Create a cabal project file

To build and test the Hasktorch library, run:

$ cabal build hasktorch  # Build the Hasktorch library.
$ cabal test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ cabal build examples  # Build the Hasktorch examples.
$ cabal test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE=cpu             # Set device to CPU for the MNIST CNN example.
$ cabal run static-mnist-cnn    # Run the MNIST CNN example.

linux+stack+cpu

Install the Haskell Tool Stack if you haven't already, following instructions here

Starting from the top-level directory of the project, run:

$ pushd deps     # Change to the deps directory and save the current directory.
$ ./get-deps.sh  # Run the shell script to retrieve the libtorch dependencies.
$ popd           # Go back to the root directory of the project.
$ source setenv  # Set the shell environment to reference the shared library locations.

To build and test the Hasktorch library, run:

$ stack build hasktorch  # Build the Hasktorch library.
$ stack test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ stack build examples  # Build the Hasktorch examples.
$ stack test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE=cpu             # Set device to CPU for the MNIST CNN example.
$ stack run static-mnist-cnn     # Run the MNIST CNN example.

macos+stack+cpu

Install the Haskell Tool Stack if you haven't already, following instructions here

Starting from the top-level directory of the project, run:

$ pushd deps     # Change to the deps directory and save the current directory.
$ ./get-deps.sh  # Run the shell script to retrieve the libtorch dependencies.
$ popd           # Go back to the root directory of the project.
$ source setenv  # Set the shell environment to reference the shared library locations.

To build and test the Hasktorch library, run:

$ stack build hasktorch  # Build the Hasktorch library.
$ stack test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ stack build examples  # Build the Hasktorch examples.
$ stack test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE=cpu             # Set device to CPU for the MNIST CNN example.
$ stack run static-mnist-cnn     # Run the MNIST CNN example.

nixos+cabal+cpu

(Optional) Install and set up Cachix:

$ nix-env -iA cachix -f https://cachix.org/api/v1/install  # (Optional) Install Cachix.
$ cachix use iohk                                          # (Optional) Use IOHK's cache.
$ cachix use hasktorch                                     # (Optional) Use hasktorch's cache.

Starting from the top-level directory of the project, run:

$ nix-shell  # Enter the nix shell environment for Hasktorch.

To build and test the Hasktorch library, run:

$ cabal build hasktorch  # Build the Hasktorch library.
$ cabal test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ cabal build examples  # Build the Hasktorch examples.
$ cabal test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE=cpu             # Set device to CPU for the MNIST CNN example.
$ cabal run static-mnist-cnn    # Run the MNIST CNN example.

nixos+cabal+cuda11

(Optional) Install and set up Cachix:

$ nix-env -iA cachix -f https://cachix.org/api/v1/install  # (Optional) Install Cachix.
$ cachix use iohk                                          # (Optional) Use IOHK's cache.
$ cachix use hasktorch                                     # (Optional) Use hasktorch's cache.

Starting from the top-level directory of the project, run:

$ nix-shell --arg cudaSupport true --argstr cudaMajorVersion 11  # Enter the nix shell environment for Hasktorch.

To build and test the Hasktorch library, run:

$ cabal build hasktorch  # Build the Hasktorch library.
$ cabal test hasktorch   # Build and run the Hasktorch library test suite.

To build and test the example executables shipped with hasktorch, run:

$ cabal build examples  # Build the Hasktorch examples.
$ cabal test examples   # Build and run the Hasktorch example test suites.

To run the MNIST CNN example, run:

$ cd examples                   # Change to the examples directory.
$ ./datasets/download-mnist.sh  # Download the MNIST dataset.
$ mv mnist data                 # Move the MNIST dataset to the data directory.
$ export DEVICE="cuda:0"        # Set device to CUDA for the MNIST CNN example.
$ cabal run static-mnist-cnn    # Run the MNIST CNN example.

docker+jupyterlab+cuda11

This dockerhub repository provides the docker-image of jupyterlab. It supports cuda11, cuda10 and cpu only. When you use jupyterlab with hasktorch, type following command, then click a url in a console.

$ docker run --gpus all -it --rm -p 8888:8888 htorch/hasktorch-jupyter
or
$ docker run --gpus all -it --rm -p 8888:8888 htorch/hasktorch-jupyter:latest-cu11

Known Issues

Tensors Cannot Be Moved to CUDA

In rare cases, you may see errors like

cannot move tensor to "CUDA:0"

although you have CUDA capable hardware in your machine and have followed the getting-started instructions for CUDA support.

If that happens, check if /run/opengl-driver/lib exists. If not, make sure your CUDA drivers are installed correctly.

Weird Behaviour When Switching from CPU-Only to CUDA-Enabled Nix Shell

If you have run cabal in a CPU-only Hasktorch Nix shell before, you may need to:

  • Clean the dist-newstyle folder using cabal clean.
  • Delete the .ghc.environment* file in the Hasktorch root folder.

Otherwise, at best, you will not be able to move tensors to CUDA, and, at worst, you will see weird linker errors like

gcc: error: hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.8.3/libtorch-ffi-1.5.0.0/build/Torch/Internal/Unmanaged/Autograd.dyn_o: No such file or directory
`cc' failed in phase `Linker'. (Exit code: 1)

Contributing

We welcome new contributors.

Contact us for access to the hasktorch slack channel. You can send an email to [email protected] or on twitter as @austinvhuang, @SamStites, @tscholak, or @junjihashimoto3.

Notes for library developers

See the wiki for developer notes.

Project Folder Structure

Basic functionality:

  • deps/ - submodules and downloads for build dependencies (libtorch, mklml, pytorch) -- you can ignore this if you are on Nix
  • examples/ - high level example models (xor mlp, typed cnn, etc.)
  • experimental/ - experimental projects or tips
  • hasktorch/ - higher level user-facing library, calls into ffi/, used by examples/

Internals (for contributing developers):

  • codegen/ - code generation, parses Declarations.yaml spec from pytorch and produces ffi/ contents
  • inline-c/ - submodule to inline-cpp fork used for C++ FFI
  • libtorch-ffi/- low level FFI bindings to libtorch
  • spec/ - specification files used for codegen/
Comments
  • Support for LTS15 of stackage and ghc88

    Support for LTS15 of stackage and ghc88

    lts 15 of stackage is released. This pr fixes https://github.com/hasktorch/hasktorch/issues/276. I think stack's build works. But nix's build requires gcc-9 which does not work with libtorch-1.4.

    cabal works without nix. https://github.com/hasktorch/hasktorch/pull/282/checks?check_run_id=450296535

    opened by junjihashimoto 26
  • nixified hasktorch projects using cabal2nix

    nixified hasktorch projects using cabal2nix

    alternative to #164 using cabal2nix and extensive sharing between derivations. it’s the same approach that Gabriel Gonzales used for dhall, see https://github.com/dhall-lang/dhall-haskell/blob/master/nix/shared.nix.

    @wavewave @stites @junjihashimoto pls let me know what you think :)

    opened by tscholak 15
  • Add feature-extraction AlexNet

    Add feature-extraction AlexNet

    For now, I have used lists for data-loading so the implementation is slow and not memory efficient(~19 GB footprint). The model achieves ~80% training accuracy after 5000 iterations but validation accuracy seems rather dismal, I will try to figure what's going wrong. Meanwhile, any suggestions or feedback would be greatly appreciated!

    opened by SurajK7 14
  • Add lens for typed tensor

    Add lens for typed tensor

    This PR provides embed tensor having fields and its lens.

    For example, when we defines RGB data as follows,

    data RGB = RGB { r :: Float, g :: Float, b :: Float}
    

    the type of the embed tensor is TensorData device dtype shape RGB, and internal data of the embed tensor becomes Tensor device dtype (shape ++ [3]).

    Then the lens (e.g. field @"r" or field @"g" ) provides both setter and getter for each RGB field.

    opened by junjihashimoto 12
  • WIP: shell.nix that provides all the dependencies

    WIP: shell.nix that provides all the dependencies

    To make hasktorch buildable simply.

    $ nix-shell shell.nix
    $ cabal new-build hasktorch
    

    Note: this is not yet finalized since I disabled mkl and adjusted C++11 ABI flag. I would like to have some discussion about them.

    opened by wavewave 12
  • Cabal could not resolve dependencies

    Cabal could not resolve dependencies

    I'm having some problems installing hasktorch.

    $ cabal new-build all
    Resolving dependencies...
    cabal: Could not resolve dependencies:
    [__0] trying: hasktorch-codegen-0.0.1.0 (user goal)
    [__1] next goal: base (dependency of hasktorch-codegen)
    [__1] rejecting: base-4.9.1.0/installed-4.9... (constraint from project config
    TODO requires ==4.11.1.0)
    [__1] rejecting: base-4.11.1.0 (constraint from non-upgradeable package
    requires installed instance)
    [__1] rejecting: base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0,
    base-4.9.0.0, base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2,
    base-4.7.0.1, base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0,
    base-4.5.0.0, base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0,
    base-4.2.0.2, base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0,
    base-3.0.3.2, base-3.0.3.1 (constraint from project config TODO requires
    ==4.11.1.0)
    [__1] fail (backjumping, conflict set: base, hasktorch-codegen)
    After searching the rest of the dependency tree exhaustively, these were the
    goals I've had most trouble fulfilling: base, hasktorch-codegen
    

    Any idea what I'm doing wrong? I'm using

    $ cabal --version
    cabal-install version 2.3.0.0
    compiled using version 2.3.0.0 of the Cabal library 
    $ ls vendor/build
    libATen.so  libEHX.so
    $ echo $LD_LIBRARY_PATH
    /home/dwheeler/git/hasktorch/vendor/build/
    
    opened by wd15 12
  • Add a typed mode operator.

    Add a typed mode operator.

    This PR adds a typed mode operator, as per #233.

    I just talked to @tscholak, and he suggested that I should check that this operator actually works on CUDA. I don't have an nvidia GPU, so I haven't done this, but I would appreciate if someone could check this for me.

    Also, because I added the doctests, I didn't add any hspec tests, but I could do this if necessary.

    (Note that this PR is based on the current master, which does not yet contain a fix for actually running the doctests in CI, but I did check that the doctests I added here run correctly locally.)

    opened by cdepillabout 11
  • add some distributions

    add some distributions

    I wanna make a start toward implementing distributions and the corresponding constraints. tackling those typed seems kinda ambitious still (typed tensors, potentially type-classes), so I wanna start simple.

    opened by KiaraGrouwstra 11
  • Make+OSX Install broken with stack-managed GHC

    Make+OSX Install broken with stack-managed GHC

    On a fresh clone of the repo, the first step of the install: make init (os x) gives me:

    ~/haskell 
    # cd hasktorch/
    ~/haskell/hasktorch  master*
    # make init
    /bin/sh: ghc: command not found
    GHC version detected 
    Makefile:9: *** GHC version must be 8.4.2, 8.4.3, 8.4.4, or 8.6.1.  Stop.
    ~/haskell/hasktorch  master*
    # which ghc
    ~/haskell/hasktorch  master*
    # 
    
    

    I don't have a global ghc. Call me old school, but I'd rather have that managed by stack.

    Any recommendations?

    opened by tonyday567 11
  • Update dependencies, remove HLS from custom-tools

    Update dependencies, remove HLS from custom-tools

    Since haskell-language-server 1.0 is now in Hackage, we no longer need to add it as a custom tool.

    Also removed nixpkgs-2009 from sources.json, because it seemed like this was unused (?)

    opened by mcwitt 10
  • Support for libtorch-1.3

    Support for libtorch-1.3

    • [x] Add Dimname and DimnameList of new data-types
    • [x] Fix compilation-error
    • [x] Add Symbol of new data-type
    • [x] Upload binaries of libtorch-1.3
    • [x] Refine auto generated functions.
    opened by junjihashimoto 10
  • `nix develop` throughs error

    `nix develop` throughs error

    Hi! Thanks a lot for working on hasktorch, it looks like we do have a nice machine learning library in Haskell!

    When building hasktorch using nix develop I had the following problems:

    • Even with substituters and public keys properly set up, more than 1000 Haskell packages have to be built (not GHC, so the caches do work at least somewhat).

    • After buliding the roughly 1000 packages, the following error is thrown:

    error: derivation '/nix/store/c40s2l737pwr1b38j7agnvalgsdvs727-hoogle-with-packages.drv' requires non-existent output 'doc' from input derivation '/nix/store/0hx10c9mz48fz6d7i4dnqvk66imz79ya-vector-sized-lib-vector-sized-1.5.0-haddock.drv'
    

    (I noticed this weird package naming name-lib-name-version. Is this specific to haskell.nix?)

    • Finally, I think there is some legacy Nix code: haskell-nix.custom-tools.haskell-language-server seems to be set to version 1.5.0.0, which was released in November 2021.

    Thanks for your help!

    opened by dschrempf 8
  • Building a Tensorboard-like visualizer for hasktorch

    Building a Tensorboard-like visualizer for hasktorch

    Hi @hasktorch!

    I've noticed a DL training visualizer was proposed in Summer of Haskell 2020, but I couldn't find official work done on it. I was wondering if such project would still be appreciated by the hasktorch community. I would love to build a Tensorboard-like tool for hasktorch in my free time, implementing functionalities such as

    • Extracting and visualizing computation graphs
    • Logging/plotting metrics requested by user: loss, gradient norm, histograms, etc.
    • System profiling Besides a mechanism to extract graph structure during training (*), this would also involve building a web-app to display the collected data. A natural tangent of this would be the checkpointing mechanism, which I see was already brought up in #618!

    If such project would be appreciated, I would love to tackle it - in that case, would it be fine that I use here or the slack channel to communicate ideas?

    opened by cyoon1729 8
  • Issue while compiling for Apple M1

    Issue while compiling for Apple M1

    I am trying to compile this with ghc 8.10.7 and I get the below error with warnings of stdc++.dylib not found on Apple M1

    libHSlibtorch-ffi-1.9.0.0-inplace-ghc8.10.7.dylib, 0x0005): symbol not found in flat namespace '__ZN2at10__lshift__ERKNS_6TensorERKN3c106ScalarE'

    Looks like ghc 9.2.1 is not supported. Any plans to support Apple M1?

    opened by pgwadapool 2
  • Add nms for a motivational example of Record Dot Syntax

    Add nms for a motivational example of Record Dot Syntax

    Is it possible to combine Record Dot Syntax and named tensor? I make a motivational example for that. The python code of nms below is concise enough, but I'm wondering if Record Dot Syntax would make it even easier for users to write codes.

    # https://github.com/rbgirshick/fast-rcnn/blob/master/lib/utils/nms.py#L8-L37
    def nms(dets, thresh):
        x1 = dets[:, 0]
        y1 = dets[:, 1]
        x2 = dets[:, 2]
        y2 = dets[:, 3]
        scores = dets[:, 4]
    
        areas = (x2 - x1 + 1) * (y2 - y1 + 1)
        order = scores.argsort()[::-1]
    
        keep = []
        while order.size > 0:
            i = order[0]
            keep.append(i)
            xx1 = np.maximum(x1[i], x1[order[1:]])
            yy1 = np.maximum(y1[i], y1[order[1:]])
            xx2 = np.minimum(x2[i], x2[order[1:]])
            yy2 = np.minimum(y2[i], y2[order[1:]])
    
            w = np.maximum(0.0, xx2 - xx1 + 1)
            h = np.maximum(0.0, yy2 - yy1 + 1)
            inter = w * h
            ovr = inter / (areas[i] + areas[order[1:]] - inter)
    
            inds = np.where(ovr <= thresh)[0]
            order = order[inds + 1]
    
        return keep
    
    opened by junjihashimoto 2
  • BatchNorm isn't working correctly

    BatchNorm isn't working correctly

    It appears that the batchNormWeight and batchNormBias are being updated to be equal to what I'd expect the runningVar and runningMean to be.

    BatchNorm {batchNormWeight = IndependentTensor {toDependent = Tensor Float [1] [ 0.9001   ]}, batchNormBias = IndependentTensor {toDependent = Tensor Float [1] [ 3.8708e-2]}, runningMean = Tensor Float [1] [ 3.8708e-2], runningVar = Tensor Float [1] [ 0.9001   ]}
    

    It think the at::batch_norm api isn't doing what's expected.

    I made a repro https://github.com/tom-huntington/batch-norm-repro

    main = do
        batch_norm <- sample $ BatchNormSpec 1
        print batch_norm
        a <- randIO' [2,1]
        print a
        print $ sumDim (Dim 0) KeepDim Float a
        let b = batchNormForward batch_norm True 0.1 0 a
        print b
        print batch_norm
        print $ sumDim (Dim 0) KeepDim Float b
    
    opened by tom-huntington 13
Tensors and Dynamic neural networks in Python with strong GPU acceleration

PyTorch is a Python package that provides two high-level features: Tensor computation (like NumPy) with strong GPU acceleration Deep neural networks b

null 46.1k Feb 13, 2021
Machine learning evaluation metrics, implemented in Python, R, Haskell, and MATLAB / Octave

Note: the current releases of this toolbox are a beta release, to test working with Haskell's, Python's, and R's code repositories. Metrics provides i

Ben Hamner 1.6k Dec 26, 2022
Runtime type annotations for the shape, dtype etc. of PyTorch Tensors.

torchtyping Type annotations for a tensor's shape, dtype, names, ... Turn this: def batch_outer_product(x: torch.Tensor, y: torch.Tensor) -> torch.Ten

Patrick Kidger 1.2k Jan 3, 2023
Complex-Valued Neural Networks (CVNN)Complex-Valued Neural Networks (CVNN)

Complex-Valued Neural Networks (CVNN) Done by @NEGU93 - J. Agustin Barrachina Using this library, the only difference with a Tensorflow code is that y

youceF 1 Nov 12, 2021
This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CNPs), Neural Processes (NPs), Attentive Neural Processes (ANPs).

The Neural Process Family This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CN

DeepMind 892 Dec 28, 2022
A framework that constructs deep neural networks, autoencoders, logistic regressors, and linear networks

A framework that constructs deep neural networks, autoencoders, logistic regressors, and linear networks without the use of any outside machine learning libraries - all from scratch.

Kordel K. France 2 Nov 14, 2022
Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable the user to perform stochastic variational inference in Bayesian deep neural networks

Bayesian-Torch is a library of neural network layers and utilities extending the core of PyTorch to enable the user to perform stochastic variational inference in Bayesian deep neural networks. Bayesian-Torch is designed to be flexible and seamless in extending a deterministic deep neural network architecture to corresponding Bayesian form by simply replacing the deterministic layers with Bayesian layers.

Intel Labs 210 Jan 4, 2023
DeepHyper: Scalable Asynchronous Neural Architecture and Hyperparameter Search for Deep Neural Networks

What is DeepHyper? DeepHyper is a software package that uses learning, optimization, and parallel computing to automate the design and development of

DeepHyper Team 214 Jan 8, 2023
Code for "Neural Parts: Learning Expressive 3D Shape Abstractions with Invertible Neural Networks", CVPR 2021

Neural Parts: Learning Expressive 3D Shape Abstractions with Invertible Neural Networks This repository contains the code that accompanies our CVPR 20

Despoina Paschalidou 161 Dec 20, 2022
An implementation demo of the ICLR 2021 paper Neural Attention Distillation: Erasing Backdoor Triggers from Deep Neural Networks in PyTorch.

Neural Attention Distillation This is an implementation demo of the ICLR 2021 paper Neural Attention Distillation: Erasing Backdoor Triggers from Deep

Yige-Li 84 Jan 4, 2023
Neural-fractal - Create Fractals Using Complex-Valued Neural Networks!

Neural Fractal Create Fractals Using Complex-Valued Neural Networks! Home Page Features Define Dynamical Systems Using Complex-Valued Neural Networks

Amirabbas Asadi 10 Dec 17, 2022
This repository implements and evaluates convolutional networks on the Möbius strip as toy model instantiations of Coordinate Independent Convolutional Networks.

Orientation independent Möbius CNNs This repository implements and evaluates convolutional networks on the Möbius strip as toy model instantiations of

Maurice Weiler 59 Dec 9, 2022
UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac protocols on unmanned aerial vehicle networks.

UAV-Networks Simulator - Autonomous Networking - A.A. 20/21 UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac pr

null 0 Nov 13, 2021
High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.

TL;DR Ignite is a high-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently. Click on the image to

null 4.2k Jan 1, 2023
A Research-oriented Federated Learning Library and Benchmark Platform for Graph Neural Networks. Accepted to ICLR'2021 - DPML and MLSys'21 - GNNSys workshops.

FedGraphNN: A Federated Learning System and Benchmark for Graph Neural Networks A Research-oriented Federated Learning Library and Benchmark Platform

FedML-AI 175 Dec 1, 2022
A machine learning library for spiking neural networks. Supports training with both torch and jax pipelines, and deployment to neuromorphic hardware.

Rockpool Rockpool is a Python package for developing signal processing applications with spiking neural networks. Rockpool allows you to build network

SynSense 21 Dec 14, 2022
For auto aligning, cropping, and scaling HR and LR images for training image based neural networks

ImgAlign For auto aligning, cropping, and scaling HR and LR images for training image based neural networks Usage Make sure OpenCV is installed, 'pip

null 15 Dec 4, 2022
Lightweight library to build and train neural networks in Theano

Lasagne Lasagne is a lightweight library to build and train neural networks in Theano. Its main features are: Supports feed-forward networks such as C

Lasagne 3.8k Dec 29, 2022
Fast, flexible and fun neural networks.

Brainstorm Discontinuation Notice Brainstorm is no longer being maintained, so we recommend using one of the many other,available frameworks, such as

IDSIA 1.3k Nov 21, 2022