Add api info for torch._C._nn.pyi (#162936)

Fix part of #148404

APis involved are as followed:

- silu
- silu_
- smooth_l1_loss
- soft_margin_loss
Pull Request resolved: https://github.com/pytorch/pytorch/pull/162936
Approved by: https://github.com/FFFrog, https://github.com/ezyang
This commit is contained in:
orangeH25
2025-09-24 04:55:52 +00:00
committed by PyTorch MergeBot
parent 6f1d962d5b
commit 20eeb54814

View File

@ -772,6 +772,47 @@ def gen_nn_functional(fm: FileManager) -> None:
"Tensor",
)
],
"silu": [
defs(
"silu",
[
INPUT,
],
"Tensor",
)
],
"silu_": [
defs(
"silu_",
[
INPUT,
],
"Tensor",
)
],
"smooth_l1_loss": [
defs(
"smooth_l1_loss",
[
INPUT,
"target: Tensor",
"reduction: str = ...",
"beta: float = 1.0",
],
"Tensor",
)
],
"soft_margin_loss": [
defs(
"soft_margin_loss",
[
INPUT,
"target: Tensor",
"reduction: str = ...",
],
"Tensor",
)
],
}
)