Commit 1e4e674
authored
Feature/mnist (#47)
* Refactor UDCT and related components for improved clarity and functionality
- Updated the UDCT class to support both angular_wedges_config and num_scales/wedges_per_direction parameters for enhanced flexibility in configuration.
- Introduced MUDCTCoefficients type for monogenic transforms, improving type safety and clarity in the codebase.
- Enhanced error messages for invalid angular wedge configurations, providing clearer guidance for users.
- Updated documentation to reflect changes in parameter handling and added examples for better usability.
- Improved test coverage for UDCT and MUDCT functionalities, ensuring robustness and correctness across various configurations.
* Enhance consistency and clarity in NumPy and PyTorch module exports
- Added pylint comments to suppress duplicate code warnings in both NumPy and PyTorch __init__.py files, indicating intentional duplication for shared API.
- Updated the __all__ list in both modules to ensure consistent API exposure, aligning with the shared functionality between NumPy and PyTorch implementations.
- Improved documentation comments to clarify the rationale behind the similar exports, enhancing maintainability and understanding of the code structure.
* Update project configuration and add new example for UDCT
- Added 'data/' directory to .gitignore to exclude data files from version control.
- Updated pyproject.toml to include 'scikit-learn' as a dependency for enhanced functionality.
- Enhanced documentation requirements by adding 'torchvision' to docs/requirements.txt for improved image processing capabilities.
- Introduced a new example script 'plot_10_udct_mnist.py' demonstrating the use of UDCT for image classification on the MNIST dataset, showcasing the model architecture and training process.
* Enhance type checking and update example for UDCT
- Updated `pyproject.toml` to include `torchvision` in mypy overrides for improved type checking.
- Modified `docs/requirements.txt` to ensure `torchvision` is included for documentation builds.
- Refactored `plot_10_udct_mnist.py` to implement a two-layer MLP for classification, improving model architecture clarity and performance.
- Updated comments and documentation within the example script for better understanding and maintainability.
* Enhance UDCT example and documentation
- Updated the `plot_10_udct_mnist.py` script to return both average loss and accuracy during training and testing, improving performance metrics tracking.
- Enhanced the visualization section to include separate subplots for training/testing loss and accuracy, providing clearer insights into model performance.
- Added `:no-index:` directive in `curvelets.torch` documentation to prevent indexing, streamlining documentation navigation.
* Enhance UDCT documentation and refactor code
- Added documentation for the `UDCTModule` class in `curvelets.torch`, improving clarity on its usage and functionality.
- Refactored the `_UDCTFunction` class to remove the unused `transform_type` parameter, streamlining the API and enhancing code clarity.
- Updated the plotting script `plot_10_udct_mnist.py` for better readability by formatting plot commands across multiple lines.
* Update training configuration in UDCT MNIST example
- Increased the number of training epochs from 2 to 10 in `plot_10_udct_mnist.py` to enhance model performance.
- Updated comments and section headers for improved clarity and organization throughout the script.
* Remove outdated comments from UDCT MNIST example script
- Deleted unnecessary comments and results section in `plot_10_udct_mnist.py` to streamline the code and improve readability.
- Focused on enhancing the clarity of the plotting functionality without extraneous information.
* Add sphinx_gallery_thumbnail_number comments to example scripts
- Introduced `sphinx_gallery_thumbnail_number` comments in multiple example scripts to enhance documentation and improve visual representation in the gallery.
- Updated `plot_01_zone_plate.py`, `plot_02_direction_resolution.py`, `plot_03_direction_disk.py`, `plot_04_meyer_wavelet.py`, `plot_05_curvelet_vs_wavelet.py`, and `plot_10_udct_mnist.py` to include these comments for better organization and clarity in the generated documentation.
* Implement tensor transfer functionality in UDCTModule and UDCT
- Added the `_apply` method in `UDCTModule` to facilitate the application of functions to internal tensors during device transfers.
- Introduced `apply_to_tensors` method in `UDCT` for applying functions to all internal tensors, ensuring proper handling during device and dtype changes.
- Created unit tests for the `_apply` method in `test_udct_module_apply.py` to verify correct tensor dtype transfers and functionality after conversions.
* Update window_threshold default value in UDCTModule from 1e-6 to 1e-5
- Modified the default value of the `window_threshold` parameter in the `UDCTModule` class to improve performance and storage efficiency.
- Ensured consistency in parameter documentation to reflect the updated default value.1 parent c34c846 commit 1e4e674
File tree
21 files changed
+1077
-137
lines changed- docs
- source
- examples
- src/curvelets
- numpy
- torch
- tests
- numpy_torch_comparison
- torch
21 files changed
+1077
-137
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | | - | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
0 commit comments