LiquidNet
This is a simple implementation of the Liquid net official repo translated into pytorch for simplicity. Find the original repo here:
Install
pip install liquidnet
Usage
import torch
from liquidnet.main import LiquidNet
# Create an LiquidNet with a specified number of units
num_units = 64
ltc_cell = LiquidNet(num_units)
# Generate random input data with batch size 4 and input size 32
batch_size = 4
input_size = 32
inputs = torch.randn(batch_size, input_size)
# Initialize the cell state (hidden state)
initial_state = torch.zeros(batch_size, num_units)
# Forward pass through the LiquidNet
outputs, final_state = ltc_cell(inputs, initial_state)
# Print the shape of outputs and final_state
print("Outputs shape:", outputs.shape)
print("Final state shape:", final_state.shape)
VisionLiquidNet
- Simple model with 2 convolutions with 2 max pools, alot of room for improvement
import torch
from liquidnet.vision_liquidnet import VisionLiquidNet
# Random Input Image
x = torch.randn(4, 3, 32, 32)
# Create a VisionLiquidNet with a specified number of units
model = VisionLiquidNet(64, 10)
# Forward pass through the VisionLiquidNet
print(model(x).shape)
Citation
@article{DBLP:journals/corr/abs-2006-04439,
author = {Ramin M. Hasani and
Mathias Lechner and
Alexander Amini and
Daniela Rus and
Radu Grosu},
title = {Liquid Time-constant Networks},
journal = {CoRR},
volume = {abs/2006.04439},
year = {2020},
url = {https://arxiv.org/abs/2006.04439},
eprinttype = {arXiv},
eprint = {2006.04439},
timestamp = {Fri, 12 Jun 2020 14:02:57 +0200},
biburl = {https://dblp.org/rec/journals/corr/abs-2006-04439.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
License
MIT
Todo:
- Implement LiquidNet for vision and train on CIFAR
Metadata
Release files for liquidnet 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| liquidnet-0.0.5.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| liquidnet-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / liquidnet-0.0.5.tar.gz
| Download URL | liquidnet-0.0.5.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5163e3341c40a932025cba788dbc181517c4dd26b6e0ae1c63d4ca5a768625a3
|
|
BLAKE2b-256 checksum How to use checksums |
9a353b75c0e49bee70341fc2c43d61e4d5537c1084a36da78d2517d507317b7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Release files / liquidnet-0.0.5-py3-none-any.whl
| Download URL | liquidnet-0.0.5-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b74aeb3c3e3c2ec0ea8a37329fae1f5bf7acb17571a4e041c588cd874c0cdda2
|
|
BLAKE2b-256 checksum How to use checksums |
8573a66f1bae5f1fb4efb84f40ef23cf018ae6d12cf62fafd400dc624defe84e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|