Skip to content
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

Support index is tensor or list for getitem in static mode #33000

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

liym27
Copy link
Contributor

@liym27 liym27 commented May 19, 2021

PR types

New features

PR changes

APIs

Describe

As the title

For example:

tensor_x = paddle.to_tensor(np.array([[1,2],[3,4]]).astype(np.float32))
tensor_x[[0,0]] 

@paddle-bot-old
Copy link

paddle-bot-old bot commented May 19, 2021

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@liym27 liym27 changed the title Static getitem tensor or list Support index is tensor or list for setitem in static mode May 19, 2021
@liym27 liym27 changed the title Support index is tensor or list for setitem in static mode Support index is tensor or list for getitem in static mode May 20, 2021
@paddle-bot-old
Copy link

Sorry to inform you that 1c9991d's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Add variable_index.py

Support getitem inx is Tensor or List
@liym27 liym27 force-pushed the static_getitem_tensor_or_list branch from 1c9991d to 13760aa Compare June 1, 2021 06:17
@liym27 liym27 requested a review from zhhsplendid June 2, 2021 09:45
Copy link
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liym27 liym27 merged commit 9c52ade into PaddlePaddle:develop Jun 2, 2021
liym27 added a commit to liym27/Paddle that referenced this pull request Jun 11, 2021
lanxianghit pushed a commit that referenced this pull request Jun 15, 2021
…ist/Tensor/None/Ellipsis/bool (#33528)

* [cherry-pick 2.1] Polish code for _getitem_impl_ (#32868)

* [cherry-pick] Polish code for setitem and getitem (#32911)

* [slice getitem] Support getitem idx is Tensor or List (#33000)

* [getitem] Support index is None for getitem in static mode (#33001)

* [Static getitem] Support static Variable getitem for Ellipsis index (#32876)

* [static getitem]Support index is list bool for getitem in static mode (#33298)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants