liquidnet


Nameliquidnet JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/kyegomez/LiqudNet
SummaryLiquid Net - Pytorch
upload_time2023-11-06 06:25:56
maintainer
docs_urlNone
authorKye Gomez
requires_python>=3.9,<4.0
licenseMIT
keywords artificial intelligence deep learning optimizers prompt engineering
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)

# LiquidNet
This is a simple implementation of the Liquid net official repo translated into pytorch for simplicity. [Find the original repo here:](https://github.com/raminmh/liquid_time_constant_networks)

## Install
`pip install liquidnet`

## Usage
```python
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

```python
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
```bibtex
@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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kyegomez/LiqudNet",
    "name": "liquidnet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "artificial intelligence,deep learning,optimizers,Prompt Engineering",
    "author": "Kye Gomez",
    "author_email": "kye@apac.ai",
    "download_url": "https://files.pythonhosted.org/packages/9a/35/3b75c0e49bee70341fc2c43d61e4d5537c1084a36da78d2517d507317b7d/liquidnet-0.0.5.tar.gz",
    "platform": null,
    "description": "[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# LiquidNet\nThis is a simple implementation of the Liquid net official repo translated into pytorch for simplicity. [Find the original repo here:](https://github.com/raminmh/liquid_time_constant_networks)\n\n## Install\n`pip install liquidnet`\n\n## Usage\n```python\nimport torch\nfrom liquidnet.main import LiquidNet\n\n# Create an LiquidNet with a specified number of units\nnum_units = 64\nltc_cell = LiquidNet(num_units)\n\n# Generate random input data with batch size 4 and input size 32\nbatch_size = 4\ninput_size = 32\ninputs = torch.randn(batch_size, input_size)\n\n# Initialize the cell state (hidden state)\ninitial_state = torch.zeros(batch_size, num_units)\n\n# Forward pass through the LiquidNet\noutputs, final_state = ltc_cell(inputs, initial_state)\n\n# Print the shape of outputs and final_state\nprint(\"Outputs shape:\", outputs.shape)\nprint(\"Final state shape:\", final_state.shape)\n\n```\n\n## `VisionLiquidNet`\n- Simple model with 2 convolutions with 2 max pools, alot of room for improvement\n\n```python\nimport torch \nfrom liquidnet.vision_liquidnet import VisionLiquidNet\n\n# Random Input Image\nx = torch.randn(4, 3, 32, 32)\n\n# Create a VisionLiquidNet with a specified number of units\nmodel = VisionLiquidNet(64, 10)\n\n# Forward pass through the VisionLiquidNet\nprint(model(x).shape)\n\n\n```\n\n\n# Citation\n```bibtex\n@article{DBLP:journals/corr/abs-2006-04439,\n  author       = {Ramin M. Hasani and\n                  Mathias Lechner and\n                  Alexander Amini and\n                  Daniela Rus and\n                  Radu Grosu},\n  title        = {Liquid Time-constant Networks},\n  journal      = {CoRR},\n  volume       = {abs/2006.04439},\n  year         = {2020},\n  url          = {https://arxiv.org/abs/2006.04439},\n  eprinttype    = {arXiv},\n  eprint       = {2006.04439},\n  timestamp    = {Fri, 12 Jun 2020 14:02:57 +0200},\n  biburl       = {https://dblp.org/rec/journals/corr/abs-2006-04439.bib},\n  bibsource    = {dblp computer science bibliography, https://dblp.org}\n}\n\n```\n\n\n# License\nMIT\n\n\n# Todo:\n- [ ] Implement LiquidNet for vision and train on CIFAR\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Liquid Net - Pytorch",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/kyegomez/LiqudNet",
        "Repository": "https://github.com/kyegomez/LiqudNet"
    },
    "split_keywords": [
        "artificial intelligence",
        "deep learning",
        "optimizers",
        "prompt engineering"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8573a66f1bae5f1fb4efb84f40ef23cf018ae6d12cf62fafd400dc624defe84e",
                "md5": "3592ae2d7f93dc06da6bb39e037325e6",
                "sha256": "b74aeb3c3e3c2ec0ea8a37329fae1f5bf7acb17571a4e041c588cd874c0cdda2"
            },
            "downloads": -1,
            "filename": "liquidnet-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3592ae2d7f93dc06da6bb39e037325e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 7076,
            "upload_time": "2023-11-06T06:25:55",
            "upload_time_iso_8601": "2023-11-06T06:25:55.051188Z",
            "url": "https://files.pythonhosted.org/packages/85/73/a66f1bae5f1fb4efb84f40ef23cf018ae6d12cf62fafd400dc624defe84e/liquidnet-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a353b75c0e49bee70341fc2c43d61e4d5537c1084a36da78d2517d507317b7d",
                "md5": "c0a0dd9aa20b114a2d81978e2fd175c8",
                "sha256": "5163e3341c40a932025cba788dbc181517c4dd26b6e0ae1c63d4ca5a768625a3"
            },
            "downloads": -1,
            "filename": "liquidnet-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "c0a0dd9aa20b114a2d81978e2fd175c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 7175,
            "upload_time": "2023-11-06T06:25:56",
            "upload_time_iso_8601": "2023-11-06T06:25:56.702408Z",
            "url": "https://files.pythonhosted.org/packages/9a/35/3b75c0e49bee70341fc2c43d61e4d5537c1084a36da78d2517d507317b7d/liquidnet-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-06 06:25:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kyegomez",
    "github_project": "LiqudNet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "liquidnet"
}
        
Elapsed time: 0.13127s