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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Orthogonal initialization feature. #1496
Add Orthogonal initialization feature. #1496
Changes from 17 commits
c277919
8bca693
95f94d4
338c378
082a971
44965f0
4a3d12b
1feb19e
b2bc5cc
7a84f42
28d05df
a8b15d1
090fd7e
8af7659
2735e0c
64d2e66
a0191a5
d542d70
9221196
943baf2
644bfef
da935bb
4b04fdd
b28b8db
57b9af3
f897c75
418b316
5e801e2
21cdfc8
3e749da
7a2b610
23a9c5b
691ca35
786eb8e
54bf710
a80bea9
c632cf2
2c9f4b8
8f2e4ed
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another small one-liner trick and feel free to take any of it, or just ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I should keep my thing, looks more elegant 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason this strikes several of us as weird is partly that it's not type-stable to re-use Q, not just for different things, but for different types depending on the values of
rows, cols
. This isn't performance-critical code but that's where everyone's taste was honed.Again, I would write
where
M
is some name for the thing which isn'tQ
anymore, and the two branches match the branches which generate the random numbers above. They could both be written out on several lines,mat = if rows > cos; randn(...
etc, but however they are written, I think they should put the then/else clauses in the same order.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the mirrored if-else clause are a bit confusing. Should change that if nothing else.