{"id":20804746,"url":"https://github.com/wizyoung/minimal-rnn-tensorflow","last_synced_at":"2026-04-29T05:04:42.712Z","repository":{"id":108074230,"uuid":"135232899","full_name":"wizyoung/Minimal-RNN-TensorFlow","owner":"wizyoung","description":"Implementation of Minimal RNN","archived":false,"fork":false,"pushed_at":"2018-09-16T14:01:50.000Z","size":292,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T13:31:27.122Z","etag":null,"topics":["minimalrnn","rnn","tensorflow"],"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/wizyoung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-29T02:46:43.000Z","updated_at":"2024-03-08T02:03:25.000Z","dependencies_parsed_at":"2024-07-07T00:30:34.941Z","dependency_job_id":null,"html_url":"https://github.com/wizyoung/Minimal-RNN-TensorFlow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wizyoung/Minimal-RNN-TensorFlow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizyoung%2FMinimal-RNN-TensorFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizyoung%2FMinimal-RNN-TensorFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizyoung%2FMinimal-RNN-TensorFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizyoung%2FMinimal-RNN-TensorFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wizyoung","download_url":"https://codeload.github.com/wizyoung/Minimal-RNN-TensorFlow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizyoung%2FMinimal-RNN-TensorFlow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32411560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T03:46:11.172Z","status":"ssl_error","status_checked_at":"2026-04-29T03:37:55.317Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["minimalrnn","rnn","tensorflow"],"created_at":"2024-11-17T19:11:38.899Z","updated_at":"2026-04-29T05:04:42.679Z","avatar_url":"https://github.com/wizyoung.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal-RNN-TensorFlow\nThis is the TensorFlow implementation of the paper: [MinimalRNN: Toward More Interpretable and Trainable Recurrent Neural Networks](https://arxiv.org/abs/1711.06788) by Minmin Chen in NIPS 2017.\n\n![](https://github.com/wizyoung/Minimal-RNN-TensorFlow/blob/master/rnn_img.png)\n\n### Usage\n\nThe usage is quite simple as the API of the Minimal RNN layer is totally the same with other RNN layers (like LSTM, GRU): Just `from rnn_cell import MinimalRNNCell` and use the standard TensorFlow RNN layer API.\n\nAn example code (Multi RNN example):\n\n```python\nimport tensorflow as tf\nfrom rnn_cell import MinimalRNNCell\n\n# input_shape: [batch_size, seq_length, feat_dim]\ninput = tf.placeholder(tf.float32, [160, 100, 1024], name='inputs')\n\ndef get_rnn_cell():\n    return MinimalRNNCell(num_units=128, kernel_initializer=tf.orthogonal_initializer())\n\nmulti_rnn_cell_video = tf.contrib.rnn.MultiRNNCell([get_rnn_cell() for _ in range(2)], state_is_tuple=True)\ninitial_state = multi_rnn_cell_video.zero_state(batch_size=160, dtype=tf.float32)\n\nrnn_outputs, state = tf.nn.dynamic_rnn(\n    cell=multi_rnn_cell_video,\n    inputs=input,\n    initial_state=initial_state,\n    dtype=tf.float32\n)\n\nprint(rnn_outputs)\nprint(state)\n```\n\noutput:\n\n```\nTensor(\"rnn/transpose_1:0\", shape=(160, 100, 128), dtype=float32)\n(\u003ctf.Tensor 'rnn/while/Exit_3:0' shape=(160, 128) dtype=float32\u003e, \u003ctf.Tensor 'rnn/while/Exit_4:0' shape=(160, 128) dtype=float32\u003e)\n```\n\nSo the usage is totally the same with other RNN layers like GRU!\n\n### NOTE\n\nThe RNN layer cells (including LSTM, GRU) in TensorFlow are defined in [tensorflow/python/ops/rnn_cell_impl.py](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/rnn_cell_impl.py). The Minimal RNN layer in this repo is inherited from the RNNCell in that file to have the consistent API. Note that the API of the RNN layer cells in TensorFlow has changed a lot after version 1.4, so I implement two versions of Minimal RNN layers corresponding to TensorFlow version \u003c=1.4 and TensorFlow version \u003e 1.4 for compatibility. And the version switch is performed automatically so you don't need to worry about that.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwizyoung%2Fminimal-rnn-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwizyoung%2Fminimal-rnn-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwizyoung%2Fminimal-rnn-tensorflow/lists"}