{"id":29554701,"url":"https://github.com/sbrunk/storch","last_synced_at":"2025-07-18T07:33:11.173Z","repository":{"id":65405031,"uuid":"497706922","full_name":"sbrunk/storch","owner":"sbrunk","description":"GPU accelerated deep learning and numeric computing for Scala 3.","archived":false,"fork":false,"pushed_at":"2024-06-28T04:53:50.000Z","size":10058,"stargazers_count":146,"open_issues_count":27,"forks_count":12,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-07-14T16:56:00.662Z","etag":null,"topics":["deep-learning","gpu","machine-learning","neural-network","scala","tensor"],"latest_commit_sha":null,"homepage":"https://storch.dev","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbrunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2022-05-29T20:51:44.000Z","updated_at":"2025-07-11T03:13:44.000Z","dependencies_parsed_at":"2023-02-12T12:15:36.692Z","dependency_job_id":"68f55f43-cb4c-422f-a6ad-573559a4f91d","html_url":"https://github.com/sbrunk/storch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sbrunk/storch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunk%2Fstorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunk%2Fstorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunk%2Fstorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunk%2Fstorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbrunk","download_url":"https://codeload.github.com/sbrunk/storch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrunk%2Fstorch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265720521,"owners_count":23817249,"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":["deep-learning","gpu","machine-learning","neural-network","scala","tensor"],"created_at":"2025-07-18T07:31:09.307Z","updated_at":"2025-07-18T07:33:11.142Z","avatar_url":"https://github.com/sbrunk.png","language":"Scala","readme":"# Storch - GPU Accelerated Deep Learning for Scala 3\n\nStorch is a Scala library for fast tensor computations and deep learning, based on PyTorch.\n\nLike PyTorch, Storch provides\n* A NumPy like API for working with tensors\n* GPU support\n* Automatic differentiation\n* A neural network API for building and training neural networks.\n\nStorch aims to close to the Python API to make porting existing models and the life of people already familiar with PyTorch easier.\n\nFor documentation, see https://storch.dev\n\n## Example:\n\n```scala\nval data = Seq(0,1,2,3)\n// data: Seq[Int] = List(0, 1, 2, 3)\nval t1 = torch.Tensor(data)\n// t1: Tensor[Int32] = dtype=int32, shape=[4], device=CPU \n// [0, 1, 2, 3]\nt1.equal(torch.arange(0,4))\n// res0: Boolean = true\nval t2 = t1.to(dtype=float32)\n// t2: Tensor[Float32] = dtype=float32, shape=[4], device=CPU \n// [0,0000, 1,0000, 2,0000, 3,0000]\nval t3 = t1 + t2\n// t3: Tensor[Float32] = dtype=float32, shape=[4], device=CPU \n// [0,0000, 2,0000, 4,0000, 6,0000]\n\nval shape = Seq(2l,3l)\n// shape: Seq[Long] = List(2, 3)\nval randTensor = torch.rand(shape)\n// randTensor: Tensor[Float32] = dtype=float32, shape=[2, 3], device=CPU \n// [[0,4341, 0,9738, 0,9305],\n//  [0,8987, 0,1122, 0,3912]]\nval zerosTensor = torch.zeros(shape, dtype=torch.int64)\n// zerosTensor: Tensor[Int64] = dtype=int64, shape=[2, 3], device=CPU \n// [[0, 0, 0],\n//  [0, 0, 0]]\n\nval x = torch.ones(Seq(5))\n// x: Tensor[Float32] = dtype=float32, shape=[5], device=CPU \n// [1,0000, 1,0000, 1,0000, 1,0000, 1,0000]\nval w = torch.randn(Seq(5, 3), requiresGrad=true)\n// w: Tensor[Float32] = dtype=float32, shape=[5, 3], device=CPU \n// [[0,8975, 0,5484, 0,2307],\n//  [0,2689, 0,7430, 0,6446],\n//  [0,9503, 0,6342, 0,7523],\n//  [0,5332, 0,7497, 0,3665],\n//  [0,3376, 0,6040, 0,5033]]\nval b = torch.randn(Seq(3), requiresGrad=true)\n// b: Tensor[Float32] = dtype=float32, shape=[3], device=CPU \n// [0,2638, 0,9697, 0,3664]\nval z = (x matmul w) + b\n// z: Tensor[Float32] = dtype=float32, shape=[3], device=CPU \n// [3,2513, 4,2490, 2,8640]\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbrunk%2Fstorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbrunk%2Fstorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbrunk%2Fstorch/lists"}