{"id":18439461,"url":"https://github.com/idiap/bayesian-recurrence","last_synced_at":"2025-04-15T03:42:08.075Z","repository":{"id":51542801,"uuid":"515064935","full_name":"idiap/bayesian-recurrence","owner":"idiap","description":"A Bayesian Interpretation of Recurrence in Neural Networks","archived":false,"fork":false,"pushed_at":"2023-10-18T17:43:22.000Z","size":14,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T03:27:09.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idiap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSES/BSD-3-Clause.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-18T06:42:58.000Z","updated_at":"2024-10-31T09:04:45.000Z","dependencies_parsed_at":"2024-11-06T06:27:48.723Z","dependency_job_id":"8bebe569-877e-4b10-a68b-7dee123688a9","html_url":"https://github.com/idiap/bayesian-recurrence","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbayesian-recurrence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbayesian-recurrence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbayesian-recurrence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fbayesian-recurrence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idiap","download_url":"https://codeload.github.com/idiap/bayesian-recurrence/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003935,"owners_count":21196794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:24:51.438Z","updated_at":"2025-04-15T03:42:08.041Z","avatar_url":"https://github.com/idiap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute \u003ccontact@idiap.ch\u003e\n\nSPDX-FileContributor: Alexandre Bittar \u003cabittar@idiap.ch\u003e\n\nSPDX-License-Identifier: BSD-3-clause\n\nThis file is part of the bayesian-recurrence package\n---\u003e\n\n# A Bayesian Interpretation of Recurrence in Neural Networks\n\nThis repository contains the different Bayesian recurrent units (BRUs)\nimplemented in PyTorch, that were defined in the following papers by A. Bittar\nand P. Garner,\n- [A Bayesian Interpretation of the Light Gated Recurrent Unit](https://rc.signalprocessingsociety.org/conferences/icassp-2021/SPSICASSP21VID0356.html?source=IBP), ICASSP 2021\n- [Bayesian Recurrent Units and the Forward-Backward Algorithm](https://arxiv.org/abs/2207.10486), INTERSPEECH 2022.\n\n\nContact: abittar@idiap.ch\n\n## Installation\n\n    git clone https://github.com/idiap/bayesian-recurrence.git\n    cd bayesian-recurrence\n    pip install -r requirements.txt\n    python setup.py install\n\n## Usage\n\nAfter the installation, the defined recurrent units are available as python modules.\nOne can then create networks of the desired Bayesian units and use them inside PyTorch.\n\n    \n    import torch\n    import torch.nn as nn\n    \n    from bayesian_recurrence.libru import liBRU\n\n    # Build input\n    batch_size = 4\n    nb_steps = 100\n    nb_inputs = 20\n    x = torch.Tensor(batch_size, nb_steps, nb_inputs)\n    nn.init.uniform_(x)\n\n    # Define network\n    net = liBRU(\n        nb_inputs,\n        layer_sizes=[128, 128, 10],\n        bidirectional=True,\n        hidden_type='probs',\n        normalization='batchnorm',\n        use_bias=False,\n        dropout=0.\n        )\n\n    # Pass input tensor through network\n    y = net(x)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fbayesian-recurrence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidiap%2Fbayesian-recurrence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fbayesian-recurrence/lists"}