Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Conversation

@jekbradbury
Copy link
Contributor

No description provided.

We need this because a subtle distinction between NumPy/PyTorch's basic
slicing and advanced indexing behavior means that no single value for
the batch dimension index will get us the right behavior for
example-level programming, given that we're working with a user-visible
batch dimension.

The Matchbox equivalent of truly example-level `arr[0]` (basic slicing)
is `arr[:, 0]`, but the equivalent of `arr[[0]]` is `arr[[0], [0]]`.
With the sentinel they can be written as `arr[BD, 0]` and `arr[BD,
[0]]`.
I'm pretty confident there's a logic bug somewhere in this commit.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant