{"id":19382863,"url":"https://github.com/locuslab/stable_dynamics","last_synced_at":"2025-04-23T20:32:31.310Z","repository":{"id":50676005,"uuid":"190268128","full_name":"locuslab/stable_dynamics","owner":"locuslab","description":"Companion code to \"Learning Stable Deep Dynamics Models\" (Manek and Kolter, 2019)","archived":false,"fork":false,"pushed_at":"2019-12-02T17:42:24.000Z","size":27303,"stargazers_count":33,"open_issues_count":2,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T20:11:24.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/locuslab.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}},"created_at":"2019-06-04T19:41:00.000Z","updated_at":"2025-03-25T10:20:52.000Z","dependencies_parsed_at":"2022-09-02T00:13:08.016Z","dependency_job_id":null,"html_url":"https://github.com/locuslab/stable_dynamics","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/locuslab%2Fstable_dynamics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fstable_dynamics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fstable_dynamics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fstable_dynamics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locuslab","download_url":"https://codeload.github.com/locuslab/stable_dynamics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250509869,"owners_count":21442514,"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":[],"created_at":"2024-11-10T09:23:38.111Z","updated_at":"2025-04-23T20:32:30.458Z","avatar_url":"https://github.com/locuslab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning Stable Deep Dynamics Models\n\nCompanion code to \"Learning Stable Deep Dynamics Models\" (Manek and Kolter, 2019)\n\n## Installation\n\nYou need Python 3.6 or later, with packages listed in `requirements.txt`. Ensure that the directories `experiments/` and `runs/` are writable.\n\n## Running\n\nAll training commands produce output in the `experiments/` folder, automatically named with the hyperparameters used in training. You can track training progress using `tensorboard runs/`.\n\n### Pendulum\n\nTo train the models for an `\u003cn\u003e`-link pendulum, you should first run the command:\n\n```sh\n./train_pendulum_simple \u003cn\u003e\n```\n\nwhich will create and cache the training data and the evaluation data. (Warning: this is a cpu-heavy task that may take hours to complete.) Once that is complete, you can train multiple models in parallel with:\n\n```sh\n./train_many \u003cn\u003e\n```\n\nYou can concurrently train train models with different `\u003cn\u003e`.\n\nEnsure that `pendulum-cache/` is writable.\n\n### VAE\n\nTo train the VAE, you need to convert videos to sequentially-numbered frames in `youtube/\u003cvideo\u003e/fr_[0-9]*.jpg`. A good place to start is [this](https://www.youtube.com/watch?v=I4dYM1biVq0) video, which you can download and convert with:\n\n```sh\nmkdir youtube\ncd youtube\nyoutube-dl -o bonfire.%(ext) -f 134 I4dYM1biVq0\nffmpeg -ss 0:01:00 -i bonfire.mp4 -t 3:20 -vf scale=320:240 bonfire/fr_%06d.png\n```\n\n(You need to install `youtube-dl` and `ffmpeg`.)\n\nOnce that is done, you can train the simple VAE model with:\n\n```sh\n./train_vae_simple bonfire\n```\n\nAnd the stable VAE with:\n\n```sh\n./train_vae_stable stable_exp bonfire 0.0005 -0.25 0.00 PSICNN 0.001\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocuslab%2Fstable_dynamics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocuslab%2Fstable_dynamics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocuslab%2Fstable_dynamics/lists"}