tednet: a framework of tensor decomposition network.
Project description
tednet
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])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tednet-0.1.3.tar.gz.
File metadata
- Download URL: tednet-0.1.3.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c7535f84de13299dce0fb66b5765e36bde9580d8bbb1ae3ba1ec7a110f3af7b
|
|
| MD5 |
a7b291c04b67d74cd02f476f1a19057e
|
|
| BLAKE2b-256 |
f829ddb3922c35dab1dba45493ebdd044860e56837626a142a1b8aec08d97da9
|
File details
Details for the file tednet-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tednet-0.1.3-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93d13689322a55f8ee4d01f2415bcc119c15bf1463ae203372b5e16e412c77a8
|
|
| MD5 |
e36620d57394a501410da4e6a2b5f835
|
|
| BLAKE2b-256 |
f1644ff163b1c3340185a8748586eb18af46f75eed2f26025c009fc7a115856e
|