Graph Slice node (resolves #483)#517
Merged
ryanrhymes merged 3 commits intoowlbarn:masterfrom Apr 16, 2020
Merged
Conversation
Contributor
Author
|
I added more detailed printing: |
Collaborator
|
Cool! Thanks for this PR! Looks good to me. I'm just wondering if we can put the slicing shape inference routine to the owl_utils_infer_shape.ml file. |
Contributor
Author
|
@jzstark I was not aware of that file, but that looks very appropriate. Latest commit moves it. |
ryanrhymes
approved these changes
Apr 15, 2020
jzstark
approved these changes
Apr 15, 2020
mseri
added a commit
to mseri/opam-repository
that referenced
this pull request
Oct 4, 2020
CHANGES: * various documentation improvements (thanks @pveber, @UnixJunkie, @Fourchaux) * Fix use of access operators (owlbarn/owl#543) * Upgrade to ocamlformat 0.15.0 (thanks @gpetiot owlbarn/owl#535) * keep_dims option (owlbarn/owl#531) * stats: fix infinite loop in ecdf * Use Fun.protect to ensure all file descriptors are being closed * owl_ndarray_maths: improve user experience in case of errors * owl_io: close file descriptors also in case of errors * owl_dense_ndarray_generic: fix error on printing 0-ary arrays * fixed bug in sub forward mode (owlbarn/owl#533) * Add stack to Algodiff (owlbarn/owl#528) * added log_sum_exp to Ndarray and Algodiff (owlbarn/owl#527) * added single-precision and double-precision Bessel functions to Ndarray (owlbarn/owl#526) * Fixes owlbarn/owl#518 by introducing another `/` to resolve data directory (@jotterbach owlbarn/owl#519) * Graph Slice node (resolves owlbarn/owl#483) (@mreppen owlbarn/owl#517) * Graph subnetwork: Multiple outputs (@mreppen owlbarn/owl#515) * Added kron and swap to Algodiff operations (owlbarn/owl#512) * various other small fixes
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.
A node producing a
get_sliceon its input.Most code that is not boilerplate is for computing the output dimension. The calculation itself is pretty much the same as in
_enumerate_slice_def(https://github.com/owlbarn/owl/blob/master/src/base/dense/owl_base_dense_ndarray_generic.ml#L99). Theassertis a bit more aggressive (checks bounds) to avoidAssert_failure ("src/base/core/owl_base_slicing.ml", 90, 10).when running.I am aware of special cases like that "later" axes do not need to be specified, and handle that. Are there others that I might have missed?
There is one potential extra feature: A bool flag to set whether trivial dimensions (those with length 1) should be remove, i.e., reshaped away. Is this too niche/specialized?There is still a TODO for prettier (more detailed) printing.Example: