Code Monkey home page Code Monkey logo

tednet's Introduction

Python package Documentation Status PyPI - License PyPI

TedNet: A Pytorch Toolkit for Tensor Decomposition Networks

tednet is a toolkit for tensor decomposition networks. Tensor decomposition networks are neural networks whose layers are decomposed by tensor decomposition, including CANDECOMP/PARAFAC, Tucker2, Tensor Train, Tensor Ring and so on. For a convenience to do research on it, tednet provides excellent tools to deal with tensorial networks.

Now, tednet is easy to be installed by pip:

pip install tednet

More information could be found in Document.


Quick Start

Operation

There are some operations supported in tednet, and it is convinient to use them. First, import it:

import tednet as tdt

Create matrix whose diagonal elements are ones:

diag_matrix = tdt.eye(5, 5)

A way to transfer the Pytorch tensor into numpy array:

diag_matrix = tdt.to_numpy(diag_matrix)

Similarly, the numpy array can be taken into Pytorch tensor by:

diag_matrix = tdt.to_tensor(diag_matrix)
Tensor Decomposition Networks (Tensor Ring for Sample)

To use tensor ring decomposition models, simply calling the tensor ring module is enough.

import tednet.tnn.tensor_ring as tr

# Define a TR-LeNet5
model = tr.TRLeNet5(10, [6, 6, 6, 6])

Citing

If you use tednet in an academic work, we will appreciate you for citing our paper with:

@article{DBLP:journals/corr/abs-2104-05018,
  author    = {Yu Pan and
               Maolin Wang and
               Zenglin Xu},
  title     = {TedNet: {A} Pytorch Toolkit for Tensor Decomposition Networks},
  journal   = {CoRR},
  volume    = {abs/2104.05018},
  year      = {2021},
  url       = {https://arxiv.org/abs/2104.05018},
  archivePrefix = {arXiv},
  eprint    = {2104.05018},
  timestamp = {Mon, 19 Apr 2021 16:45:47 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2104-05018.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

tednet's People

Contributors

iyupan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.