From c92a63827fd12942a19f73f5c8d0cdd20afe6374 Mon Sep 17 00:00:00 2001 From: Eric_lai Date: Thu, 14 Apr 2022 16:00:49 +0800 Subject: [PATCH] releasee 0.5.1 --- docs/index.rst | 1 - docs/modules/nn.rst | 8 ++++++-- setup.py | 2 +- tensorlayerx/nn/core/common.py | 4 ++-- tensorlayerx/nn/layers/deprecated.py | 21 +++++++++++++++++++++ tensorlayerx/package_info.py | 2 +- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index e4ae4c3..5a71d53 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -60,7 +60,6 @@ method, this part of the documentation is for you. modules/files modules/nn modules/model - modules/pretrain_models modules/vision modules/initializers modules/ops diff --git a/docs/modules/nn.rst b/docs/modules/nn.rst index a2a1e20..233b1c3 100644 --- a/docs/modules/nn.rst +++ b/docs/modules/nn.rst @@ -13,7 +13,7 @@ Layer list .. autosummary:: Module - + ModuleList Sequential Input @@ -125,7 +125,11 @@ Module ^^^^^^^^^^^^^^^^ .. autoclass:: Module -Sequential Layer +ModuleList +^^^^^^^^^^^^^^^^ +.. autoclass:: ModuleList + +Sequential ^^^^^^^^^^^^^^^^ .. autoclass:: Sequential diff --git a/setup.py b/setup.py index 3918cde..0a87aa4 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ MAJOR = 0 MINOR = 5 -PATCH = 0 +PATCH = 1 PRE_RELEASE = '' # Use the following formatting: (major, minor, patch, prerelease) VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE) diff --git a/tensorlayerx/nn/core/common.py b/tensorlayerx/nn/core/common.py index 72fa462..774a96f 100644 --- a/tensorlayerx/nn/core/common.py +++ b/tensorlayerx/nn/core/common.py @@ -54,14 +54,14 @@ def str2act(act): if len(act) > 5 and act[0:5] == "lrelu": try: alpha = float(act[5:]) - return tlx.ops.LeakyReLU(alpha=alpha) + return tlx.ops.LeakyReLU(negative_slope=alpha) except Exception as e: raise Exception("{} can not be parsed as a float".format(act[5:])) if len(act) > 10 and act[0:10] == "leaky_relu": try: alpha = float(act[10:]) - return tlx.ops.LeakyReLU(alpha=alpha) + return tlx.ops.LeakyReLU(negative_slope=alpha) except Exception as e: raise Exception("{} can not be parsed as a float".format(act[10:])) diff --git a/tensorlayerx/nn/layers/deprecated.py b/tensorlayerx/nn/layers/deprecated.py index 237b56a..19a2545 100644 --- a/tensorlayerx/nn/layers/deprecated.py +++ b/tensorlayerx/nn/layers/deprecated.py @@ -456,3 +456,24 @@ def SequentialLayer(*args, **kwargs): def LayerList(*args, **kwargs): raise NonExistingLayerError("LayerList(layer_list) --> ModuleList(layer_list)" + __log__) + + +__all__ += ['DeConv1d'] + + +def DeConv1d(*args, **kwargs): + raise NonExistingLayerError("DeConv1d --> ConvTranspose1d" + __log__) + + +__all__ += ['DeConv2d'] + + +def DeConv2d(*args, **kwargs): + raise NonExistingLayerError("DeConv2d --> ConvTranspose2d" + __log__) + + +__all__ += ['DeConv3d'] + + +def DeConv3d(*args, **kwargs): + raise NonExistingLayerError("DeConv3d --> ConvTranspose3d" + __log__) diff --git a/tensorlayerx/package_info.py b/tensorlayerx/package_info.py index 12afa0b..548261c 100644 --- a/tensorlayerx/package_info.py +++ b/tensorlayerx/package_info.py @@ -4,7 +4,7 @@ MAJOR = 0 MINOR = 5 -PATCH = 0 +PATCH = 1 PRE_RELEASE = '' # Use the following formatting: (major, minor, patch, prerelease) VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE)