Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Operators: subtraction, multiplication, concat and stride slice#224

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dboyliao wants to merge28 commits intodevelop
base:develop
Choose a base branch
Loading
fromdboy_work

Conversation

@dboyliao
Copy link
Member

Add operators to runtime:

  • SubOperator: elementwise subtraction
  • MulOperator: elementwise multiplication
  • ConcatOperator: concat tensors along given axis
  • StrideSliceOperator: strided tensor slicing, ext[:, ..., :3]

@mbartling
Copy link
Member

@dboyliao Can you add some quick comments on theStridedIterator in this chat? I'm pretty sure you wrote the original stride op

@dboyliao
Copy link
MemberAuthor

dboyliao commentedJun 7, 2021
edited
Loading

Ok.
The basic idea ofStridedIterator is simple, it will give you the linear index/offset of the source tensor given the stride slice specs.
For example, if the given slice specs are0:3 and1:5:2 and input tensor of shape(5, 10), all possible strided indices are:

  • (0, 1), with linear index1
  • (0, 3), with linear index3
    ....
  • (2, 9), with linear index29

Then in the strided slice op, I only need to copy value from source tensor based on the linear indices.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mbartlingmbartlingAwaiting requested review from mbartling

@neil-tanneil-tanAwaiting requested review from neil-tan

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@dboyliao@mbartling

[8]ページ先頭

©2009-2025 Movatter.jp