{"id":16539749,"url":"https://github.com/rickstaa/tf2-eager-vs-graph-grad-problem","last_synced_at":"2026-06-11T07:31:10.092Z","repository":{"id":104253663,"uuid":"296677817","full_name":"rickstaa/tf2-eager-vs-graph-grad-problem","owner":"rickstaa","description":"Small repository that shows the problems I encountered while translating tf1 code to tf2 eager code.","archived":false,"fork":false,"pushed_at":"2020-09-22T07:22:53.000Z","size":278,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T03:20:10.603Z","etag":null,"topics":[],"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/rickstaa.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":"2020-09-18T16:44:10.000Z","updated_at":"2020-11-04T09:45:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc268fe2-788a-40c2-a022-0b8cb28adf91","html_url":"https://github.com/rickstaa/tf2-eager-vs-graph-grad-problem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rickstaa/tf2-eager-vs-graph-grad-problem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftf2-eager-vs-graph-grad-problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftf2-eager-vs-graph-grad-problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftf2-eager-vs-graph-grad-problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftf2-eager-vs-graph-grad-problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickstaa","download_url":"https://codeload.github.com/rickstaa/tf2-eager-vs-graph-grad-problem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2Ftf2-eager-vs-graph-grad-problem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34188272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","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":[],"created_at":"2024-10-11T18:50:24.626Z","updated_at":"2026-06-11T07:31:10.072Z","avatar_url":"https://github.com/rickstaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf2 Eager vs Graph gradients problem\n\nA Simple example repository to show the problems I have with computing gradients of a\nSquashed gaussian actor [Haarnoja et al. 2019](https://arxiv.org/abs/1801.01290). I\nencountered these problems when I tried to translate the tf1 code of the Lyapunov Actor\nCritic Agent of [Han et al 2019](http://arxiv.org/abs/2004.14288) into tf2 eager code.\n\n## Use instructions\n\n### Conda environment\n\nFrom the general python package sanity perspective, it is a good idea to use conda environments to make sure packages from different projects do not interfere with each other.\n\nTo create a conda env with python3, one runs\n\n```bash\nconda create -n lac_clean_tf2_eager python=3.8\n```\n\nTo activate the env:\n\n```bash\nconda activate lac_clean_tf2_eager\n```\n\n### Installation Environment\n\n```bash\npip install -r requirements.txt\n```\n\nThen you are free to run main.py to train agents. Hyperparameters for training LAC in Cartpole are ready to run by default. If you would like to test other environments and algorithms, please open variant.py and choose corresponding 'env_name' and 'algorithm_name'.\n\n### Run scripts\n\n#### Full LAC implementations\n\nThe full LAC implementations LAC-tf1, LAC-tf2-eager and LAC-tf2-GRAPH can be started with the following python command:\n\n```bash\npython LAC-tf1/train.py\n```\n\n#### Grad problem scripts\n\nThe grad problem scripts can be started with the following python command:\n\n```python\npython tf2_val_grad_eager.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2Ftf2-eager-vs-graph-grad-problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickstaa%2Ftf2-eager-vs-graph-grad-problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2Ftf2-eager-vs-graph-grad-problem/lists"}