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

isNaN implementation #5030

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brightening-eyes
Copy link
Contributor

No description provided.

@Baiyuetribe
Copy link
Contributor

@brightening-eyes Can you try Gather in implementation? This one is in many onnx models.

@brightening-eyes
Copy link
Contributor Author

@Baiyuetribe
I will do that afterwards.
for example, pytorch uses gather when it converts the models to onnx, as onnx does not have anything as embedding. rather, it uses gather to index from a matrix of weights.
for positional embeddings (for absolutes and sometimes relatives), it uses range along with gather which both of them should be implemented.

@nihui
Copy link
Member

nihui commented Sep 21, 2023

shall be placed in unaryop

@brightening-eyes
Copy link
Contributor Author

the thing is, for isNaN, this might seem true.
but isInf has detect_negative and detect_positive attributes which makes it completely different from unaryop.
so, in this case, it is best to avoid modifying unaryop.

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.

None yet

3 participants