{"id":47809066,"url":"https://github.com/balditommaso/pylandscape","last_synced_at":"2026-04-03T18:01:48.556Z","repository":{"id":277331323,"uuid":"926126886","full_name":"balditommaso/PyLandscape","owner":"balditommaso","description":"This project propose the loss landscape analysis as effective methodology to understand the robustness against natural perturbation of QNN. ","archived":false,"fork":false,"pushed_at":"2026-03-26T10:53:56.000Z","size":34370,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T13:35:56.368Z","etag":null,"topics":["loss-functions","quantization-aware-training","regularization-methods","robustness"],"latest_commit_sha":null,"homepage":"http://arxiv.org/abs/2502.08355","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/balditommaso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-02T16:10:37.000Z","updated_at":"2026-03-26T10:54:00.000Z","dependencies_parsed_at":"2025-08-05T10:13:54.614Z","dependency_job_id":"ec33c9c8-f86c-4e37-af00-ba2560d29965","html_url":"https://github.com/balditommaso/PyLandscape","commit_stats":null,"previous_names":["balditommaso/pylandscape"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/balditommaso/PyLandscape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balditommaso%2FPyLandscape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balditommaso%2FPyLandscape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balditommaso%2FPyLandscape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balditommaso%2FPyLandscape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balditommaso","download_url":"https://codeload.github.com/balditommaso/PyLandscape/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balditommaso%2FPyLandscape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31368156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["loss-functions","quantization-aware-training","regularization-methods","robustness"],"created_at":"2026-04-03T18:01:44.209Z","updated_at":"2026-04-03T18:01:48.549Z","avatar_url":"https://github.com/balditommaso.png","language":"Python","readme":"# PyLandscape\n\n## Introduction\n\n`pylandscape` is a Pytorch library for loss landscape analysis of neural networks. The library enables computing the following metrics:\n\n- [CKA similarity](https://arxiv.org/pdf/2010.15327)\n- [Hessian metrics](https://arxiv.org/pdf/1912.07145)\n- [Mode connectivity](https://arxiv.org/pdf/1802.10026)\n- [Loss surface](https://arxiv.org/pdf/1712.09913)\n\n*NOTE*: All the functionalities relative to the computation of the Hessian metrics have been embedded via [PyHessian](https://github.com/amirgholami/PyHessian). If your interested in learning more about how these metrics are computed have a look to their Repository.\n\n## Usage\n\n### Install from Pip\n\nYou can install the library from pip:\n\n```\npip install pylandscape\n```\n\u003c!-- \n### Install from source\n\nYou can also compile the library from source\n\n```\ngit clone https://github.com/balditommaso/PyLandscape.git\npip install -r requirements.txt\n```\n\n### Download the HGCAL dataset\n\nHide for double blinded peer reviews.\n\n\n### Download the Fusion dataset\n\nHide for double blinded peer reviews.\n\n### Train the models\n\n1. Train full precision (FP32) version of the model:\n\n```\n. scripts/train.sh \\\n    --config ./config/econ/baseline.yml \\\n    --bs 1024 \\\n    --lr 0.0015625 \\\n    --device_id 0 \\\n    --num_test 3 \\\n    --full_precision\n```\n\n2. Fine tune the models with QAT:\n\n```\n. scripts/train.sh \\\n    --config ./config/large_econ/baseline_gaussian.yml \\\n    --bs 1024 \\\n    --lr 0.0015625 \\\n    --device_id 0 \\\n    --num_test 3 \\\n    --pretrained\n```\n\n3. Test the model both metrics and benchmarks\n```\n. scripts/test.sh \\\n    --config ./config/econ/baseline.yml \\\n    --bs 1024 \\\n    --lr 0.0015625 \\\n    --device_id 0 \\\n    --max_processes 3 \\\n    --num_models 3\n``` --\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalditommaso%2Fpylandscape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalditommaso%2Fpylandscape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalditommaso%2Fpylandscape/lists"}