From 5db469883e451c96a8be9904cb35e79e6810ab16 Mon Sep 17 00:00:00 2001 From: Ryan Spring Date: Fri, 26 Apr 2024 20:47:04 -0700 Subject: [PATCH] Add depreciated parameters --- thunder/torch/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thunder/torch/__init__.py b/thunder/torch/__init__.py index aca7a7956d..dadca84a43 100644 --- a/thunder/torch/__init__.py +++ b/thunder/torch/__init__.py @@ -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