花园宝宝战队 ----- 一阶段代码注释成果 #10
|
|
@ -11,7 +11,8 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ============================================================================
|
||||
# ============================================================================】
|
||||
# 用于初始化layer
|
||||
"""
|
||||
Layer.
|
||||
|
||||
|
|
@ -19,22 +20,39 @@ The high-level components(Cells) used to construct the neural network.
|
|||
"""
|
||||
from . import activation, normalization, container, conv, basic, embedding, pooling, image, quant, math, \
|
||||
combined, timedistributed, thor_layer, rnns, rnn_cells
|
||||
# 包含激活函数(如ReLU、sigmoid等)
|
||||
from .activation import *
|
||||
# 包含数据归一化方法(如Batch Normalization、Layer Normalization等)
|
||||
from .normalization import *
|
||||
# 包含神经网络层容器(如Sequential、TimeDistributed等)
|
||||
from .container import *
|
||||
# 包含卷积层(如Conv1D、Conv2D等)
|
||||
from .conv import *
|
||||
# 包含所有RNN层(如SimpleRNN、GRU、LSTM等)
|
||||
from .rnns import *
|
||||
# 包含RNN单元(如SimpleRNNCell、GRUCell、LSTMCell等)
|
||||
from .rnn_cells import *
|
||||
# 包含基本层(如Dense、Flatten等)
|
||||
from .basic import *
|
||||
# 包含嵌入层(将文本数据转换为向量表示)
|
||||
from .embedding import *
|
||||
# 包含池化层(如MaxPooling1D、MaxPooling2D等)
|
||||
from .pooling import *
|
||||
# 包含图像层(如ResizeMethod、RandomCrop等)
|
||||
from .image import *
|
||||
# 包含量化层(将浮点数转换为定点数)
|
||||
from .quant import *
|
||||
# 包含数学运算层(如Add、Multiply等)
|
||||
from .math import *
|
||||
# 包含组合层(将多个层组合为一个层)
|
||||
from .combined import *
|
||||
# 包含时间序列层(如Bidirectional、TimeDistributed等)
|
||||
from .timedistributed import *
|
||||
# 包含Thor层(用于Thor框架)
|
||||
from .thor_layer import DenseThor, Conv2dThor, EmbeddingThor, EmbeddingLookupThor
|
||||
|
||||
# 定义一个名为__all__的列表,并将多个模块中的类添加到该列表中
|
||||
# 下面extend中和上面的import中包含的基本一致
|
||||
__all__ = []
|
||||
__all__.extend(activation.__all__)
|
||||
__all__.extend(normalization.__all__)
|
||||
|
|
|
|||
Loading…
Reference in New Issue