{"id":19753422,"url":"https://github.com/popfido/widedeeprecsys","last_synced_at":"2026-04-30T03:36:59.245Z","repository":{"id":74966483,"uuid":"234470624","full_name":"popfido/WideDeepRecSys","owner":"popfido","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-03T09:28:59.000Z","size":9902,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T00:04:20.291Z","etag":null,"topics":["recommendation-system","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/popfido.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":"2020-01-17T04:30:09.000Z","updated_at":"2020-06-03T09:29:02.000Z","dependencies_parsed_at":"2023-03-08T19:45:21.868Z","dependency_job_id":null,"html_url":"https://github.com/popfido/WideDeepRecSys","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/popfido/WideDeepRecSys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/popfido%2FWideDeepRecSys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/popfido%2FWideDeepRecSys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/popfido%2FWideDeepRecSys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/popfido%2FWideDeepRecSys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/popfido","download_url":"https://codeload.github.com/popfido/WideDeepRecSys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/popfido%2FWideDeepRecSys/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32454145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["recommendation-system","tensorflow"],"created_at":"2024-11-12T02:52:44.083Z","updated_at":"2026-04-30T03:36:58.460Z","avatar_url":"https://github.com/popfido.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wide and Deep Learning for CTR Prediction in tensorflow\n## Overview\n\nThis is a forked self-maintained version of [Wide-Deep by Lapis-Hong](https://github.com/Lapis-Hong/wide_deep)\n\nA general **Wide and Deep Joint Learning** Framework. \nDeep part can be a simple Dnn, Dnn Variants(ResDnn, DenseDnn), MultiDnn \nor even combine with Cnn (Dnn-Cnn).\n\n\nHere, the [wide and deep model](https://research.googleblog.com/2016/06/wide-deep-learning-better-together-with.html) \nis used to predict the click labels. \nThe **wide model** is able to memorize interactions with data with a large number of features \nbut not able to generalize these learned interactions on new data. The **deep model** generalizes \nwell but is unable to learn exceptions within the data. \nThe **wide and deep model** combines the two models and is able to generalize while learning exceptions.\n\nThe code uses the high level `tf.estimator.Estimator` API. \nThis API is great for fast iteration and quickly adapting models to your own datasets without major code overhauls. \nIt allows you to move from single-worker training to distributed training, and it makes it easy to export model \nbinaries for prediction.\n\nThe input function for the `Estimator` uses `tf.data.Dataset` API, which creates a `Dataset` object. \nThe `Dataset` API makes it easy to apply transformations (map, batch, shuffle, etc.) to the data. \n[Read more here](https://www.tensorflow.org/programmers_guide/datasets).\n\nThe code is based on the [TensorFlow wide and deep tutorial](https://github.com/tensorflow/models/tree/master/official/r1/wide_deep).\n\nThe Minimal required tensorflow version is r1.14 since I changed most of tensorflow api to tensorflow 2 compatible version.\n\n## Extensions\n1. provide very flexible feature configuration and train configuration.\n2. scalable to arbitrarily train data size in production environment.\n3. support multi value feature input (multihot).\n4. support distributed tensorflow  \n5. support custom dnn network (arbitrary connections between layers) with flexible options.\n6. support BN layer; activation_fn; l1,l2 reg; weight decay lr options for training.\n7. support dnn, multidnn joint learning, even combine with cnn.\n8. support 3 types normalization for continuous features.\n9. support weight column for imbalance sample.\n10. provide tensorflow serving for tf.estimator.\n11. Compatible version between tensorflow 1 and 2.\n\n## Requirements\n\n- python \u003e=3.5\n- tensorflow \u003e=1.14\n- tensorflow-serving-api\n- numpy\n- yaml\n- PIL\n- absl-py\n\n## Running the code\n### Setup\n```\ncd conf\nvim feature.yaml\nvim model.yaml\nvim train.yaml\n...\n```\n\n### Training\nYou can run the code locally as follows:\n\n```\ncd python\npython train.py\n```\nor use shell scripts as follows:\n```\ncd scripts\nbash train.sh\n```\n\n### Testing\n```\npython eval.py\n```\nor use shell scripts as follows:\n```\nbash test.sh\n```\n\n### Distributed Training\nrun the code on ps as follows:\n```\ncd scripts\nbash run_ps.sh\n```\n\n### TensorBoard\n\nRun TensorBoard to inspect the details about the graph and training progression.\n\n```\ntensorboard --logdir=./model/wide_deep\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpopfido%2Fwidedeeprecsys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpopfido%2Fwidedeeprecsys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpopfido%2Fwidedeeprecsys/lists"}