{"id":28913837,"url":"https://github.com/glencrawford/tensorflow_imdb_reviews_text_classification","last_synced_at":"2026-05-10T03:01:47.580Z","repository":{"id":138946928,"uuid":"222235167","full_name":"GlenCrawford/tensorflow_imdb_reviews_text_classification","owner":"GlenCrawford","description":"Text sentiment classification with a Tensorflow 2 and Keras neural network.","archived":false,"fork":false,"pushed_at":"2019-11-17T11:45:45.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-17T19:30:19.550Z","etag":null,"topics":["keras","machine-learning","neural-network","python","tensorflow","text-classification"],"latest_commit_sha":null,"homepage":"","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/GlenCrawford.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,"zenodo":null}},"created_at":"2019-11-17T11:07:33.000Z","updated_at":"2019-11-17T11:45:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d106c79-f0b8-4b0f-8cb1-1b636366c84c","html_url":"https://github.com/GlenCrawford/tensorflow_imdb_reviews_text_classification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GlenCrawford/tensorflow_imdb_reviews_text_classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlenCrawford%2Ftensorflow_imdb_reviews_text_classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlenCrawford%2Ftensorflow_imdb_reviews_text_classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlenCrawford%2Ftensorflow_imdb_reviews_text_classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlenCrawford%2Ftensorflow_imdb_reviews_text_classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlenCrawford","download_url":"https://codeload.github.com/GlenCrawford/tensorflow_imdb_reviews_text_classification/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlenCrawford%2Ftensorflow_imdb_reviews_text_classification/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267883850,"owners_count":24160234,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["keras","machine-learning","neural-network","python","tensorflow","text-classification"],"created_at":"2025-06-21T21:10:51.234Z","updated_at":"2026-05-10T03:01:42.820Z","avatar_url":"https://github.com/GlenCrawford.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IMDB movie review sentiment classification with a Tensorflow and Keras neural network\n\nTensorflow/Keras neural network to train on the [IMDB dataset of 50,000 movie reviews](http://ai.stanford.edu/%7Eamaas/data/sentiment/) and classify reviews as positive or negative using binary sentiment classification with 87% accuracy.\n\nThe dataset is a collection of reviews (25,000 for training and 25,000 for testing), each one being a movie review as an array of \"words\", each word represented as an integer which maps to a word in the word index. The word index is a dictionary of nearly a hundred thousand words.\n\nEach review has an associated label, which is a binary integer representing whether the review is positive or negative.\n\nAdapted/fixed/modified/annotated starting from a [tutorial](https://www.youtube.com/watch?v=6g4O5UOH304) by [@TechWithTimm](https://twitter.com/TechWithTimm).\n\n## Requirements\n\nPython version: 3.7.4\n\nSee dependencies.txt for packages and versions (and below to install).\n\n## Architecture of the neural network\n\nEach review input, after preprocessing, is an array of \"words\", represented as integers that map to a word in the word index, truncated/padded as necessary to 250 words.\n\n__Embedding and GlobalAveragePooling1D layers:__ Groups similar words in the word index together, based on the context that they are used in.\n\n__Hidden layer:__ 16 neurons.\n\n__Output layer:__ 1 neuron with a value between 0 and 1 (squashed using the sigmoid function) denoting whether the review is positive or negative.\n\nFor more details of the model's architecture, refer to the comment annotations in the code.\n\n## Setup\n\nClone the Git repo.\n\nInstall the dependencies:\n\n```bash\npip install -r dependencies.txt\n```\n\n## Run\n\n```bash\npython main.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglencrawford%2Ftensorflow_imdb_reviews_text_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglencrawford%2Ftensorflow_imdb_reviews_text_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglencrawford%2Ftensorflow_imdb_reviews_text_classification/lists"}