Commit 2e96671
feat: add Vision Transformer (ViT) implementation for image classification (#13334)
* docs: enhance README with table of contents, installation guide, and features section
- Add comprehensive table of contents for easy navigation
- Include detailed installation steps with virtual environment setup
- Add usage examples showing how to run and import algorithms
- Create features section listing all algorithm categories
- Add explicit license section with MIT License information
- Expand contributing section with quick start guide
- Add about section explaining repository purpose
Fixes #13111
* docs: enhance README with table of contents, installation guide, and features section
- Add comprehensive table of contents for easy navigation
- Include detailed installation steps with virtual environment setup
- Add usage examples showing how to run and import algorithms
- Create features section listing all algorithm categories
- Add explicit license section with MIT License information
- Expand contributing section with quick start guide
- Add about section explaining repository purpose
Fixes #13111
* feat: add Vision Transformer (ViT) implementation for image classification
- Implement complete ViT architecture with patch embedding
- Add positional encoding with learnable CLS token
- Include scaled dot-product attention mechanism
- Implement transformer encoder blocks with layer normalization
- Add feed-forward network with GELU activation
- Include comprehensive docstrings and type hints
- Add doctests for all functions
- Provide example usage demonstrating the complete pipeline
Fixes #13326
* fix: resolve ruff linting errors in vision_transformer.py
- Replace Optional with X | None syntax (UP045)
- Use np.random.Generator instead of legacy np.random methods (NPY002)
- Fix line length violations (E501)
- Assign f-string literals to variables in exceptions (EM102)
- Remove unused variables and parameters (RUF059, F841)
- Add noqa comment for intentionally unused API parameter
- All doctests still pass successfully
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: use descriptive parameter names instead of 'x'
- Rename 'x' to 'embeddings' in layer_norm, feedforward_network,
and transformer_encoder_block functions
- Update all docstring examples to use 'embeddings'
- Improves code readability per algorithms-keeper bot feedback
- Fix noqa comment placement for unused num_heads parameter
- All doctests and ruff checks pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Remove redundant sections from README.md
Removed sections on Table of Contents, About, Features, and Contributing from README.
---------
Co-authored-by: devvratpathak <devvrat.23bce8848@vitapstudent.ac.in>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>1 parent 6a8f4ed commit 2e96671
2 files changed
Lines changed: 443 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments