-
Notifications
You must be signed in to change notification settings - Fork 81
Update urls for pytorch documentation #2521
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,7 @@ | |
# -------------------------------------------------------------------------- | ||
# pylint: disable=W0221,W0222,R0901,W0237 | ||
# mypy: disable-error-code=override | ||
# ruff: noqa: N801,E741 | ||
# ruff: noqa: D214,D402,D405,D411,D412,D416,D417 | ||
# ruff: noqa: D214, D402, D405, D411, D416 | ||
# -------------------------------------------------------------------------- | ||
|
||
from __future__ import annotations | ||
|
@@ -128,7 +127,7 @@ | |
They are used to interpolate output values of `Y[N, C, H_out, W_out]`. | ||
|
||
The GridSample operator is often used in doing grid generator and sampler in the [Spatial Transformer Networks](https://arxiv.org/abs/1506.02025). | ||
See also in [torch.nn.functional.grid_sample](https://pytorch.org/docs/master/generated/torch.nn.functional.grid_sample.html#torch-nn-functional-grid-sample). | ||
See also in [torch.nn.functional.grid_sample](https://docs.pytorch.org/master/generated/torch.nn.functional.grid_sample.html#torch-nn-functional-grid-sample). | ||
|
||
|
||
Args: | ||
|
@@ -253,38 +252,7 @@ | |
B_If: TypeAlias = BOOL | ||
|
||
V_If: TypeAlias = Union[ | ||
Optional[Sequence[BFLOAT16]], | ||
Optional[Sequence[BOOL]], | ||
Optional[Sequence[COMPLEX128]], | ||
Optional[Sequence[COMPLEX64]], | ||
Optional[Sequence[DOUBLE]], | ||
Optional[Sequence[FLOAT]], | ||
Optional[Sequence[FLOAT16]], | ||
Optional[Sequence[INT16]], | ||
Optional[Sequence[INT32]], | ||
Optional[Sequence[INT64]], | ||
Optional[Sequence[INT8]], | ||
Optional[Sequence[STRING]], | ||
Optional[Sequence[UINT16]], | ||
Optional[Sequence[UINT32]], | ||
Optional[Sequence[UINT64]], | ||
Optional[Sequence[UINT8]], | ||
Optional[BFLOAT16], | ||
Optional[BOOL], | ||
Optional[COMPLEX128], | ||
Optional[COMPLEX64], | ||
Optional[DOUBLE], | ||
Optional[FLOAT], | ||
Optional[FLOAT16], | ||
Optional[INT16], | ||
Optional[INT32], | ||
Optional[INT64], | ||
Optional[INT8], | ||
Optional[STRING], | ||
Optional[UINT16], | ||
Optional[UINT32], | ||
Optional[UINT64], | ||
Optional[UINT8], | ||
None, | ||
Check warningCode scanning / lintrunner RUFF/RUF036 Warning
None not at the end of the type annotation..
See https://docs.astral.sh/ruff/rules/none-not-at-end-of-union |
||
Sequence[BFLOAT16], | ||
Sequence[BOOL], | ||
Sequence[COMPLEX128], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. onnxscript/onnx_opset/_impl is auto generated - we cannot create manual changes to them. I would suggest reverting |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,7 @@ | |
# -------------------------------------------------------------------------- | ||
# pylint: disable=W0221,W0222,R0901,W0237 | ||
# mypy: disable-error-code=override | ||
# ruff: noqa: N801,E741 | ||
# ruff: noqa: D214,D402,D405,D411,D412,D416,D417 | ||
# ruff: noqa: D214, D402, D405, D411, D412, D416 | ||
# -------------------------------------------------------------------------- | ||
|
||
from __future__ import annotations | ||
|
@@ -72,7 +71,7 @@ | |
subset of the input tensor according to the kernel size and downsampling the | ||
data into the output tensor Y for further processing. The output spatial shape is calculated differently | ||
depending on whether explicit padding is used, where pads is employed, or auto padding is used, where auto_pad is utilized. | ||
With explicit padding (https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html?highlight=maxpool#torch.nn.MaxPool2d): | ||
With explicit padding (https://docs.pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html?highlight=maxpool#torch.nn.MaxPool2d): | ||
``` | ||
output_spatial_shape[i] = floor((input_spatial_shape[i] + pad_shape[i] - dilation[i] * (kernel_shape[i] - 1) - 1) / strides_spatial_shape[i] + 1) | ||
``` | ||
|
@@ -701,53 +700,14 @@ | |
B_If: TypeAlias = BOOL | ||
|
||
V_If: TypeAlias = Union[ | ||
Optional[Sequence[BFLOAT16]], | ||
Optional[Sequence[BOOL]], | ||
Optional[Sequence[COMPLEX128]], | ||
Optional[Sequence[COMPLEX64]], | ||
Optional[Sequence[DOUBLE]], | ||
Optional[Sequence[FLOAT]], | ||
Optional[Sequence[FLOAT16]], | ||
Optional[Sequence[INT16]], | ||
Optional[Sequence[INT32]], | ||
Optional[Sequence[INT64]], | ||
Optional[Sequence[INT8]], | ||
Optional[Sequence[STRING]], | ||
Optional[Sequence[UINT16]], | ||
Optional[Sequence[UINT32]], | ||
Optional[Sequence[UINT64]], | ||
Optional[Sequence[UINT8]], | ||
Optional[BFLOAT16], | ||
Optional[BOOL], | ||
Optional[COMPLEX128], | ||
Optional[COMPLEX64], | ||
Optional[DOUBLE], | ||
Optional[FLOAT], | ||
Optional[FLOAT16], | ||
Optional[FLOAT8E4M3FN], | ||
Optional[FLOAT8E4M3FNUZ], | ||
Optional[FLOAT8E5M2], | ||
Optional[FLOAT8E5M2FNUZ], | ||
Optional[INT16], | ||
Optional[INT32], | ||
Optional[INT64], | ||
Optional[INT8], | ||
Optional[STRING], | ||
Optional[UINT16], | ||
Optional[UINT32], | ||
Optional[UINT64], | ||
Optional[UINT8], | ||
None, | ||
Check warningCode scanning / lintrunner RUFF/RUF036 Warning
None not at the end of the type annotation..
See https://docs.astral.sh/ruff/rules/none-not-at-end-of-union |
||
Sequence[BFLOAT16], | ||
Sequence[BOOL], | ||
Sequence[COMPLEX128], | ||
Sequence[COMPLEX64], | ||
Sequence[DOUBLE], | ||
Sequence[FLOAT], | ||
Sequence[FLOAT16], | ||
Sequence[FLOAT8E4M3FN], | ||
Sequence[FLOAT8E4M3FNUZ], | ||
Sequence[FLOAT8E5M2], | ||
Sequence[FLOAT8E5M2FNUZ], | ||
Sequence[INT16], | ||
Sequence[INT32], | ||
Sequence[INT64], | ||
|
@@ -777,6 +737,10 @@ | |
UINT32, | ||
UINT64, | ||
UINT8, | ||
Sequence[FLOAT8E4M3FN], | ||
Sequence[FLOAT8E4M3FNUZ], | ||
Sequence[FLOAT8E5M2], | ||
Sequence[FLOAT8E5M2FNUZ], | ||
] | ||
|
||
def If(self, cond: B_If, *, else_branch: GraphProto, then_branch: GraphProto) -> V_If: | ||
|
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.
We can still keep the changes here and in the sphinx docs