{"id":19180016,"url":"https://github.com/pierreablin/autoptim","last_synced_at":"2025-04-15T11:19:53.550Z","repository":{"id":135723256,"uuid":"170997107","full_name":"pierreablin/autoptim","owner":"pierreablin","description":"Automatic differentiation + optimization","archived":false,"fork":false,"pushed_at":"2019-03-21T15:39:40.000Z","size":25,"stargazers_count":103,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T19:21:22.543Z","etag":null,"topics":["autodiff","numpy","optimization"],"latest_commit_sha":null,"homepage":"","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/pierreablin.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":"2019-02-16T11:39:49.000Z","updated_at":"2025-02-23T00:23:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d931a5a-715b-4156-a5b2-7a915a82cded","html_url":"https://github.com/pierreablin/autoptim","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/pierreablin%2Fautoptim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreablin%2Fautoptim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreablin%2Fautoptim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreablin%2Fautoptim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierreablin","download_url":"https://codeload.github.com/pierreablin/autoptim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248684904,"owners_count":21145160,"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":["autodiff","numpy","optimization"],"created_at":"2024-11-09T10:47:21.896Z","updated_at":"2025-04-15T11:19:53.528Z","avatar_url":"https://github.com/pierreablin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autoptim: automatic differentiation + optimization\n\nDo you have a new machine learning model that you want to optimize, and do not want to bother computing the gradients? Autoptim is for you.\n\n\n### Warning:\nAs of version 0.3, `pytorch` has been replaced with `autograd` for automatic differentiation. It makes the interfacing with numpy even simpler.\n\n\n## Short presentation\nAutoptim is a small Python package that blends `autograd`'s automatic differentiation in `scipy.optimize.minimize`.\n\nThe gradients are computed under the hood using automatic differentiation; the user only provides the objective function:\n\n```python\nimport numpy as np\nfrom autoptim import minimize\n\n\ndef rosenbrock(x):\n    return (1 - x[0]) ** 2 + 100 * (x[1] - x[0] ** 2) ** 2\n\n\nx0 = np.zeros(2)\n\nx_min, _ = minimize(rosenbrock, x0)\nprint(x_min)\n\n\u003e\u003e\u003e [0.99999913 0.99999825]\n```\n\nIt comes with the following features:\n\n- **Natural interfacing with Numpy**: The objective function is written in standard Numpy. The input/ output of `autoptim.minimize` are Numpy arrays.\n\n- **Smart input processing**: `scipy.optimize.minimize` is only meant to deal with one-dimensional arrays as input. In `autoptim`, variables can be multi-dimensional arrays or lists of arrays.\n- **Preconditioning**: Preconditioning is a simple way to accelerate minimization, by doing a change of variables. `autoptim` makes preconditioning straightforward.\n\n\n### Disclaimer\n\nThis package is meant to be as easy to use as possible. As so, some compromises on the speed of minimization are made.\n## Installation\n  To install, use `pip`:\n  ```\n  pip install autoptim\n  ```\n## Dependencies\n- numpy\u003e=1.12\n- scipy\u003e=0.18.0\n- autograd \u003e= 1.2\n\n\n## Examples\nSeveral examples can be found in `autoptim/tutorials`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierreablin%2Fautoptim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierreablin%2Fautoptim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierreablin%2Fautoptim/lists"}