{"id":13936669,"url":"https://github.com/icoxfog417/tensorflow_qrnn","last_synced_at":"2025-04-09T21:16:46.762Z","repository":{"id":14242133,"uuid":"76165712","full_name":"icoxfog417/tensorflow_qrnn","owner":"icoxfog417","description":"QRNN implementation for TensorFlow","archived":false,"fork":false,"pushed_at":"2023-03-24T21:54:35.000Z","size":222,"stargazers_count":236,"open_issues_count":5,"forks_count":38,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-09T21:16:41.716Z","etag":null,"topics":["natural-language-processing","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icoxfog417.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-11T09:43:56.000Z","updated_at":"2025-01-23T06:07:44.000Z","dependencies_parsed_at":"2024-05-02T22:31:55.716Z","dependency_job_id":"60ffbca1-350f-49c9-a771-2cbcacf59560","html_url":"https://github.com/icoxfog417/tensorflow_qrnn","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/icoxfog417%2Ftensorflow_qrnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoxfog417%2Ftensorflow_qrnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoxfog417%2Ftensorflow_qrnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icoxfog417%2Ftensorflow_qrnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icoxfog417","download_url":"https://codeload.github.com/icoxfog417/tensorflow_qrnn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"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":["natural-language-processing","tensorflow"],"created_at":"2024-08-07T23:02:54.021Z","updated_at":"2025-04-09T21:16:46.740Z","avatar_url":"https://github.com/icoxfog417.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Tensorflow QRNN\n\nQRNN implementation for TensorFlow. Implementation refer to below blog.\n\n[New neural network building block allows faster and more accurate text understanding](http://metamind.io/research/new-neural-network-building-block-allows-faster-and-more-accurate-text-understanding/)\n\n![qrnn.PNG](./pictures/qrnn.PNG)\n\n## Dependencies\n\n* TensorFlow: 0.12.0\n* scikit-learn: 0.18.1 (for working check)\n\n## How to run\n\n**Forward Test**\n\nTo confirm forward propagation, run below script.\n\n```\npython test_tf_qrnn_forward.py\n```\n\n**Working Check**\n\nTo confirm the performance of QRNN compare with baseline(LSTM), run below script.\nDataset is [scikit-learn's digit dataset](http://scikit-learn.org/stable/auto_examples/datasets/plot_digits_last_image.html).\n\n\n```\npython test_tf_qrnn_work.py\n```\n\nYou can check the calculation result by [TensorBoard](https://www.tensorflow.org/versions/r0.12/how_tos/summaries_and_tensorboard/index.html).\n\n![tensorboard.PNG](./pictures/tensorboard.PNG)\n\nFor example.\n\n```\ntensorboard --logdir=./summary/qrnn\n```\n\n## Experiments\n\n```\nBaseline(LSTM) Working check\nIter 0: loss=2.473149299621582, accuracy=0.1171875\nIter 100: loss=0.31235527992248535, accuracy=0.921875\nIter 200: loss=0.1704500913619995, accuracy=0.9453125\nIter 300: loss=0.0782063901424408, accuracy=0.9765625\nIter 400: loss=0.04097321629524231, accuracy=1.0\nIter 500: loss=0.023687714710831642, accuracy=0.9921875\nIter 600: loss=0.07718617469072342, accuracy=0.9765625\nIter 700: loss=0.02005828730762005, accuracy=0.9921875\nIter 800: loss=0.006271282210946083, accuracy=1.0\nIter 900: loss=0.007853344082832336, accuracy=1.0\nTestset Accuracy=0.9375\ntakes 15.83749008178711 seconds.\n```\n\n```\nQRNN Working check\nIter 0: loss=6.942812919616699, accuracy=0.0703125\nIter 100: loss=1.6366937160491943, accuracy=0.59375\nIter 200: loss=0.7058627605438232, accuracy=0.796875\nIter 300: loss=0.3940553069114685, accuracy=0.8984375\nIter 400: loss=0.2623080909252167, accuracy=0.9375\nIter 500: loss=0.3940059542655945, accuracy=0.921875\nIter 600: loss=0.1395827978849411, accuracy=0.96875\nIter 700: loss=0.11944477260112762, accuracy=0.984375\nIter 800: loss=0.1389300674200058, accuracy=0.9765625\nIter 900: loss=0.09582504630088806, accuracy=0.96875\nTestset Accuracy=0.9140625\ntakes 13.540465116500854 seconds.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficoxfog417%2Ftensorflow_qrnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficoxfog417%2Ftensorflow_qrnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficoxfog417%2Ftensorflow_qrnn/lists"}