mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 09:48:39 +08:00
tensorflow: add Activation, GlobalAveragePooling2D and MaxPool2D layers (#15302)
This commit is contained in:
@@ -443,4 +443,48 @@ class GaussianDropout(Layer[tf.Tensor, tf.Tensor]):
|
||||
name: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
class Activation(Layer[tf.Tensor, tf.Tensor]):
|
||||
def __init__(
|
||||
self,
|
||||
activation: _Activation = None,
|
||||
*,
|
||||
# **kwargs passed to Layer
|
||||
# **kwargs passed to Layer
|
||||
activity_regularizer: _Regularizer = None,
|
||||
trainable: bool = True,
|
||||
dtype: _LayerDtype | None = None,
|
||||
autocast: bool = True,
|
||||
name: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
class GlobalAveragePooling2D(Layer[tf.Tensor, tf.Tensor]):
|
||||
def __init__(
|
||||
self,
|
||||
data_format: Literal["channels_last", "channels_first"] | None = None,
|
||||
keepdims: bool = False,
|
||||
*,
|
||||
# **kwargs passed to Layer
|
||||
activity_regularizer: _Regularizer = None,
|
||||
trainable: bool = True,
|
||||
dtype: _LayerDtype | None = None,
|
||||
autocast: bool = True,
|
||||
name: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
class MaxPool2D(Layer[tf.Tensor, tf.Tensor]):
|
||||
def __init__(
|
||||
self,
|
||||
pool_size: int | tuple[int, int] = (2, 2),
|
||||
strides: int | tuple[int, int] | None = None,
|
||||
padding: Literal["valid", "same"] = "valid",
|
||||
data_format: Literal["channels_last", "channels_first"] | None = None,
|
||||
*,
|
||||
# **kwargs passed to Layer
|
||||
activity_regularizer: _Regularizer = None,
|
||||
trainable: bool = True,
|
||||
dtype: _LayerDtype | None = None,
|
||||
autocast: bool = True,
|
||||
name: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
def __getattr__(name: str): ... # incomplete module
|
||||
|
||||
Reference in New Issue
Block a user