{"id":18561360,"url":"https://github.com/vachanvy/vision-transformers","last_synced_at":"2026-04-18T02:32:22.988Z","repository":{"id":236451486,"uuid":"786182909","full_name":"VachanVY/Vision-Transformers","owner":"VachanVY","description":"Vision-Transformers in jax using Keras. ","archived":false,"fork":false,"pushed_at":"2025-03-10T11:16:44.000Z","size":2448,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T16:51:59.792Z","etag":null,"topics":["computer-vision","deep-learning","jax","keras","transformers","vision-transformer"],"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/VachanVY.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,"zenodo":null}},"created_at":"2024-04-13T17:08:02.000Z","updated_at":"2025-03-10T11:16:48.000Z","dependencies_parsed_at":"2025-05-15T16:50:26.528Z","dependency_job_id":null,"html_url":"https://github.com/VachanVY/Vision-Transformers","commit_stats":null,"previous_names":["vachanvy/vision-transformers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VachanVY/Vision-Transformers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FVision-Transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FVision-Transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FVision-Transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FVision-Transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VachanVY","download_url":"https://codeload.github.com/VachanVY/Vision-Transformers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VachanVY%2FVision-Transformers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["computer-vision","deep-learning","jax","keras","transformers","vision-transformer"],"created_at":"2024-11-06T22:06:38.902Z","updated_at":"2026-04-18T02:32:22.971Z","avatar_url":"https://github.com/VachanVY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vision-Transformers\n\n## The Classic ViT\n![alt text](images/image1.png)\n* To handle 2D images we reshape images of shape $(H, W, C)$ to a shape $(N, P^2•C)$, where $(P, P)$ is the resolution of the original patch and $N=HW/P^2$ which is the resulting number of patches, which also serves as the effective input sequence length to the transformer\n* The last dimention is projected to $d_{model} = D$\n\n![alt text](images/image2.png)\n* $x_p^i$ is of shape $(N, P^2•C)$ is linearly projected to shape $(N, D)$ using weights of shape $(P^2•C, D)$, and $i$ goes from $1$ to $N$\n* Similar to BERT’s `[class]` token, we prepend a learnable embedding to the sequence of embedded patches ($z_0^0 = x_{class}$), whose state at the output of the Transformer encoder $(z^0_L)$ serves as the image representation $y$ (Eq. 4). Both during pre-training and fine-tuning, a classification head is attached to $z_L^0$\n* $x_{class}$ is of shape $(1, D)$\n* $z_0$ is of shape $(N+1, D)$\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvachanvy%2Fvision-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvachanvy%2Fvision-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvachanvy%2Fvision-transformers/lists"}