Fix SVD dimension mismatch and optimize matrix computations. Added detailed documentation and backward compatibility for redundant delta to alpha conversion.#3
Open
ruose1314 wants to merge 4 commits into
Conversation
…tailed documentation and backward compatibility for redundant delta to alpha conversion.
Author
|
It's possible in the copterr.py I could've made line 125 full_matrices = False and make all codes 172-177 deleted and only keep line 178 and make all simpler. |
Problem: - Previous implementation incorrectly grouped alpha values by feature groups rather than by voxel patterns. - This caused dimension mismatches when indexing into the voxel space during weight computation. Changes: 1. Modified the prepare() method in PermuteWeightsGrouped: - Transposed the alpha matrix (using alphas.T) to group by voxel patterns. - Converted the alpha values to hashable tuples to correctly compute unique values. - Ensured that alpha masks have a length equal to the number of voxels. Impact: + Fixes dimension mismatch errors in fit_permutation. + Correctly groups voxels based on their regularization settings across feature spaces. - May increase computation time and memory usage if there are many unique alpha patterns. Note: For large-scale applications with many unique alpha patterns, users may want to: - Consider quantizing alpha values to reduce the number of unique groups. - Monitor GPU memory usage. - Explore memory management strategies if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix SVD dimension mismatch and optimize matrix computations. Added detailed documentation and backward compatibility for redundant delta_to_alpha conversion.
Main Changes:
deltasparameter.__init__.pyfile.Technical Details:
Demonstration:
See
copterr/copterr_commit_demo.pyfor a demonstration of the behavior with different matrix shapes.