-
Couldn't load subscription status.
- Fork 4.3k
feat(docs): Add PyTorch logical_or term entry (closes #7786) #7797
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amritamishra01 the # Example section is missing from this which needs to come in between the Syntax and Codebyte section.
|
@amritamishra01 ping me once you do the changes and then we will move this PR ahead for next review. |
|
Done @dakshdeepHERE — added the # Example section between Syntax and Codebyte |
|
Hi @dakshdeepHERE, |
| @@ -0,0 +1,88 @@ | |||
| --- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meta data is wrong please check the template from Readme file.
|
|
||
| 1. **Function form:** | ||
|
|
||
| ```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use pseudo tag instead of python for syntax
|
|
||
| 2. **Tensor method form:** | ||
|
|
||
| ```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
| This operation can be used either as a function in the torch module or as a tensor method. | ||
|
|
||
| ## Syntax | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a small introductory descriptuion here.
| - `out` (Tensor, optional): Tensor to store the output. | ||
|
|
||
| ## Example | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a description here
| print(x.logical_or(y)) | ||
| # Output: tensor([True, False, True, True]) | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the output block for example section here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have few more changes for you to work on @amritamishra01 :)
Adds a new term entry for logical_or() in PyTorch. This entry introduces the concept of element-wise logical OR operations on tensors, explains the syntax for both the function and tensor method forms, and provides runnable examples demonstrating boolean tensors, integer tensors, and broadcasting behavior. The entry follows the term entry template, content standards, and markdown style guide for PyTorch tensor operations.