{"id":17250683,"url":"https://github.com/statusfailed/numeric-optics-haskell","last_synced_at":"2025-03-26T06:43:02.029Z","repository":{"id":145119978,"uuid":"322646741","full_name":"statusfailed/numeric-optics-haskell","owner":"statusfailed","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-18T15:54:52.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T08:19:00.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/statusfailed.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-12-18T16:26:45.000Z","updated_at":"2021-08-02T14:16:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd75be88-8c55-48a3-a494-88a99e6457af","html_url":"https://github.com/statusfailed/numeric-optics-haskell","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/statusfailed%2Fnumeric-optics-haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statusfailed%2Fnumeric-optics-haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statusfailed%2Fnumeric-optics-haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statusfailed%2Fnumeric-optics-haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statusfailed","download_url":"https://codeload.github.com/statusfailed/numeric-optics-haskell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605709,"owners_count":20643030,"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-10-15T06:49:19.706Z","updated_at":"2025-03-26T06:43:02.010Z","avatar_url":"https://github.com/statusfailed.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numeric Optics\n\nA Haskell implementation to (unofficially) accompany the paper\n[Categorical Foundations of Gradient-Based Learning](https://arxiv.org/abs/2103.01931)\nNOTE: this code is unfinished; it probably contains bugs.\n\nThe \"official\" code accompanying the paper can be found\n[here](https://github.com/statusfailed/numeric-optics-python).\n\n# Warning: Unfinished\n\nThis code is essentially incomplete, but I'm publishing it anyway because some\nof the aspects of the paper are a bit clearer in Haskell.\n\nYou should be able to build with \n\n    cabal build\n\nBut note you'll need an installation of CUDA for this to work (see the\n\"Building\" section of the README).\n\nYou can run the demo program with\n\n    cabal run\n\nwhich runs 100 iterations of SGD on the Iris dataset (but doesn't do much with\nthe results!)\n\n# Code\n\nSince I've uploaded just in case someone finds it useful, here are some pointers\nto relevant modules, the source of which can be found in the [src](./src)\ndirectory.\n\n- `Control.Categories`\n  - An alternate typeclass for Categories, with composition\n    `(~\u003e) :: cat a b -\u003e cat b c -\u003e cat a c`\n  - Typeclasses for Cartesian and Monoidal categories\n  - Some shorthand/infix operators, e.g., `π0` and `π1` for projections, and infix\n    tensor product `×`\n- `Numeric.Optics.Types`\n  - the `MonoLens` type (monomorphic lenses)\n  - Monoidal instance for `MonoLens`\n  - the `Para` type, and parametrised composition `(~~\u003e)`\n- `Numeric.Optics.Base.Accelerate`\n  - Category instances for `DSL Acc` - a type wrapping the [Accelerate DSL][accelerate]\n- `Numeric.Optics.Base.Accelerate.NeuralNetwork`\n  - Specific morphisms for building models, e.g.: `dense`, a single dense layer\n    (as in the paper)\n\n# Building\n\nThis project uses the [Accelerate][accelerate] library for GPU acceleration.\nNote that you will therefore need several system dependencies (e.g., cuda for\nthe GPU backend) in order to build.\n\n[accelerate]: https://hackage.haskell.org/package/accelerate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatusfailed%2Fnumeric-optics-haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatusfailed%2Fnumeric-optics-haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatusfailed%2Fnumeric-optics-haskell/lists"}