Skip to content

Commit 20eeb54

Browse files
orangeH25pytorchmergebot
authored andcommitted
Add api info for torch._C._nn.pyi (pytorch#162936)
Fix part of pytorch#148404 APis involved are as followed: - silu - silu_ - smooth_l1_loss - soft_margin_loss Pull Request resolved: pytorch#162936 Approved by: https://github.com/FFFrog, https://github.com/ezyang
1 parent 6f1d962 commit 20eeb54

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

tools/pyi/gen_pyi.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,47 @@ def gen_nn_functional(fm: FileManager) -> None:
772772
"Tensor",
773773
)
774774
],
775+
"silu": [
776+
defs(
777+
"silu",
778+
[
779+
INPUT,
780+
],
781+
"Tensor",
782+
)
783+
],
784+
"silu_": [
785+
defs(
786+
"silu_",
787+
[
788+
INPUT,
789+
],
790+
"Tensor",
791+
)
792+
],
793+
"smooth_l1_loss": [
794+
defs(
795+
"smooth_l1_loss",
796+
[
797+
INPUT,
798+
"target: Tensor",
799+
"reduction: str = ...",
800+
"beta: float = 1.0",
801+
],
802+
"Tensor",
803+
)
804+
],
805+
"soft_margin_loss": [
806+
defs(
807+
"soft_margin_loss",
808+
[
809+
INPUT,
810+
"target: Tensor",
811+
"reduction: str = ...",
812+
],
813+
"Tensor",
814+
)
815+
],
775816
}
776817
)
777818

0 commit comments

Comments
 (0)