{"id":13628083,"url":"https://github.com/HawkAaron/mxnet-transducer","last_synced_at":"2025-04-17T00:33:12.578Z","repository":{"id":113442675,"uuid":"130021614","full_name":"HawkAaron/mxnet-transducer","owner":"HawkAaron","description":"Fast parallel RNN-Transducer.","archived":false,"fork":false,"pushed_at":"2019-11-01T14:02:17.000Z","size":74,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-08T18:46:11.139Z","etag":null,"topics":["mxnet","rnn-transducer","sequence-transduction","transducer"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HawkAaron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-18T07:26:59.000Z","updated_at":"2023-02-04T09:59:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc631830-f6ba-48ad-86bf-052fef3b3815","html_url":"https://github.com/HawkAaron/mxnet-transducer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawkAaron%2Fmxnet-transducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawkAaron%2Fmxnet-transducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawkAaron%2Fmxnet-transducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawkAaron%2Fmxnet-transducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HawkAaron","download_url":"https://codeload.github.com/HawkAaron/mxnet-transducer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249293169,"owners_count":21245690,"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":["mxnet","rnn-transducer","sequence-transduction","transducer"],"created_at":"2024-08-01T22:00:44.862Z","updated_at":"2025-04-17T00:33:12.344Z","avatar_url":"https://github.com/HawkAaron.png","language":"C++","funding_links":[],"categories":["\u003ca name=\"NLP\"\u003e\u003c/a\u003e3. NLP"],"sub_categories":["2.14 Misc"],"readme":"# mxnet-transducer\nA fast parallel implementation of RNN Transducer (Graves 2013 joint network), on both CPU and GPU for mxnet.\n\n[GPU version is now available for Graves2012 add network.](https://github.com/HawkAaron/mxnet-transducer/tree/add_network)\n\n## Install and Test\nFirst get mxnet and the code:\n``` bash\ngit clone --recursive https://github.com/apache/incubator-mxnet\ngit clone https://github.com/HawkAaron/mxnet-transducer\n```\n\nCopy all files into mxnet dir:\n``` bash\ncp -r mxnet-transducer/rnnt* incubator-mxnet/src/operator/contrib/\n```\n\nThen follow the installation instructions of mxnet:\n```\nhttps://mxnet.incubator.apache.org/install/index.html\n```\n\nFinally, add Python API into `/path/to/mxnet_root/mxnet/gluon/loss.py`:\n\n```python\nclass RNNTLoss(Loss):\n    def __init__(self, batch_first=True, blank_label=0, weight=None, **kwargs):\n        batch_axis = 0 if batch_first else 2\n        super(RNNTLoss, self).__init__(weight, batch_axis, **kwargs)\n        self.batch_first = batch_first\n        self.blank_label = blank_label\n\n    def hybrid_forward(self, F, pred, label, pred_lengths, label_lengths):\n        if not self.batch_first:\n            pred = F.transpose(pred, (2, 0, 1, 3))\n\n        loss = F.contrib.RNNTLoss(pred, label.astype('int32', False), \n                                    pred_lengths.astype('int32', False), \n                                    label_lengths.astype('int32', False), \n                                    blank_label=self.blank_label)\n        return loss\n\n```\n\nFrom the repo test with:\n\n```bash\npython test/test.py 10 300 100 50 --mx\n```\n\n## Reference\n* [Sequence Transduction with Recurrent Neural Networks](https://arxiv.org/abs/1211.3711)\n* [SPEECH RECOGNITION WITH DEEP RECURRENT NEURAL NETWORKS](https://arxiv.org/pdf/1303.5778.pdf)\n* [Baidu warp-ctc](https://github.com/baidu-research/warp-ctc)\n* [warp-transducer](https://github.com/HawkAaron/warp-transducer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHawkAaron%2Fmxnet-transducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHawkAaron%2Fmxnet-transducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHawkAaron%2Fmxnet-transducer/lists"}