Skip to content

Commit

Permalink
Add depreciated parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rdspring1 committed Apr 27, 2024
1 parent 1222e26 commit 5db4698
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions thunder/torch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3296,10 +3296,17 @@ def cross_entropy(
a: TensorProxy,
target: TensorProxy,
weight: None | TensorProxy = None,
size_average: None | Any = None,
ignore_index: int = None,
reduce: None | Any = None,
reduction: str = "mean",
label_smoothing: float = 0.0,
) -> TensorProxy:
utils.check(
size_average is None and reduce is None,
lambda: f"Deprecated size_average={size_average} and reduce={reduce} is not supported!",
)

# Resolve ignore_index if it is not specified by user.
if ignore_index is None:
ignore_index = -1
Expand Down

0 comments on commit 5db4698

Please sign in to comment.