@@ -6,7 +6,7 @@ from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
6
6
from contextlib import contextmanager
7
7
from enum import Enum
8
8
from types import TracebackType
9
- from typing import Any , Generic , NoReturn , TypeVar , overload
9
+ from typing import Any , Generic , Literal , NoReturn , TypeVar , overload
10
10
from typing_extensions import ParamSpec , Self
11
11
12
12
from google .protobuf .message import Message
@@ -20,7 +20,7 @@ from tensorflow import (
20
20
math as math ,
21
21
types as types ,
22
22
)
23
- from tensorflow ._aliases import AnyArray , DTypeLike , ShapeLike , Slice , TensorCompatible
23
+ from tensorflow ._aliases import AnyArray , DTypeLike , ScalarTensorCompatible , ShapeLike , Slice , TensorCompatible
24
24
from tensorflow .autodiff import GradientTape as GradientTape
25
25
from tensorflow .core .protobuf import struct_pb2
26
26
from tensorflow .dtypes import *
@@ -404,4 +404,11 @@ def ones_like(
404
404
input : RaggedTensor , dtype : DTypeLike | None = None , name : str | None = None , layout : Layout | None = None
405
405
) -> RaggedTensor : ...
406
406
def reshape (tensor : TensorCompatible , shape : ShapeLike | Tensor , name : str | None = None ) -> Tensor : ...
407
+ def pad (
408
+ tensor : TensorCompatible ,
409
+ paddings : ShapeLike ,
410
+ mode : Literal ["CONSTANT" , "constant" , "REFLECT" , "reflect" , "SYMMETRIC" , "symmectric" ] = "CONSTANT" ,
411
+ constant_values : ScalarTensorCompatible = 0 ,
412
+ name : str | None = None ,
413
+ ) -> Tensor : ...
407
414
def __getattr__ (name : str ) -> Incomplete : ...
0 commit comments