{"id":26991574,"url":"https://github.com/chris-official/pytorchgaf","last_synced_at":"2026-05-10T02:49:05.922Z","repository":{"id":285955071,"uuid":"959879511","full_name":"chris-official/PyTorchGAF","owner":"chris-official","description":"PyTorch accelerated GAF transform","archived":false,"fork":false,"pushed_at":"2025-04-05T13:07:46.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T16:20:01.118Z","etag":null,"topics":["cuda","gpu","gramian-angular-fields","image-analysis","python","pytorch","time-series"],"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/chris-official.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":"2025-04-03T13:55:43.000Z","updated_at":"2025-04-05T13:07:49.000Z","dependencies_parsed_at":"2025-04-03T15:34:00.970Z","dependency_job_id":null,"html_url":"https://github.com/chris-official/PyTorchGAF","commit_stats":null,"previous_names":["chris-official/pytorchgaf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-official%2FPyTorchGAF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-official%2FPyTorchGAF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-official%2FPyTorchGAF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-official%2FPyTorchGAF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-official","download_url":"https://codeload.github.com/chris-official/PyTorchGAF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"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":["cuda","gpu","gramian-angular-fields","image-analysis","python","pytorch","time-series"],"created_at":"2025-04-03T22:16:13.542Z","updated_at":"2026-05-10T02:49:05.884Z","avatar_url":"https://github.com/chris-official.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTorchGAF: PyTorch-accelerated implementation of the Gramian Angular Field (GAF)\n\nThe provided GAF implementation uses pure PyTorch. It provides the following benefits and features:\n- Supports batched data.\n- Supports multivariate time series data.\n- Handles necessary scaling before the GAF transformation.\n- Allows to use the GAF transform directly as a neural network layer.\n- Allows directly transforming the data on the target device (CPU or GPU).\n- Uses efficient vectorized Einstein Summation Notation to compute the outer products to avoid using loops.\n\n\n\n## Optimizations\n\nOur implementation is based on the GAF transform from pyts. However, as Figure 1 shows, the GAF transform significantly benefits from GPU acceleration, achieving speedups of almost 90x for larger batch sizes.\n\n![Performance Comparison](performance_comparison.png)\n*Figure 1: Execution time comparison between CPU-based pyts implementation and our implementation on CPU and GPU.*\n\n\n## Usage/Examples\n\n```python\nimport torch\n\ngaf = GAFTransform(method=\"summation\")\ninputs = torch.randn(32, 8, 40, device=\"cuda\")  # (N, C, L)\noutput = gaf(inputs)  # (N, C, L, L)\n```\n\n\n## Acknowledgements\n\n - [pyts GitHub](https://github.com/johannfaouzi/pyts)\n - [pyts GAF](https://github.com/johannfaouzi/pyts/blob/main/pyts/image/gaf.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-official%2Fpytorchgaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-official%2Fpytorchgaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-official%2Fpytorchgaf/lists"}