Skip to main content

Liquid Net - Pytorch

Project description

Multi-Modality

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 liquid-net

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)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liquidnet-0.0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liquidnet-0.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file liquidnet-0.0.2.tar.gz.

File metadata

  • Download URL: liquidnet-0.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for liquidnet-0.0.2.tar.gz
Algorithm Hash digest
SHA256 126c1f856d2c7745e524a2ba26081362b6113b8f1c7833bb0f356b4e2acf099c
MD5 85cb1e513d125a019677292e5b6c6750
BLAKE2b-256 be7681949ade71c143d2c6dfe261e50d0aeb2651a15d07ecd62c551f4df05fd0

See more details on using hashes here.

File details

Details for the file liquidnet-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: liquidnet-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for liquidnet-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a2f5b74cb33efc9d307beb131f54eaedc9a84f8dde1fcad535a7b58d085547c
MD5 abeb8ae7093479f778a3c0fbece772c4
BLAKE2b-256 560cc4759c1436c4f996fe52b2242ea8a5a17aab97df8941366f8ceb9ce531c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page