这篇教程Python layers.MaxPooling1D方法代码示例写得很实用,希望能帮到您。
本文整理汇总了Python中keras.layers.MaxPooling1D方法的典型用法代码示例。如果您正苦于以下问题:Python layers.MaxPooling1D方法的具体用法?Python layers.MaxPooling1D怎么用?Python layers.MaxPooling1D使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在模块keras.layers 的用法示例。 在下文中一共展示了layers.MaxPooling1D方法的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。 示例1: create_model# 需要导入模块: from keras import layers [as 别名]# 或者: from keras.layers import MaxPooling1D [as 别名]def create_model(time_window_size, metric): model = Sequential() model.add(Conv1D(filters=256, kernel_size=5, padding='same', activation='relu', input_shape=(time_window_size, 1))) model.add(MaxPooling1D(pool_size=4)) model.add(LSTM(64)) model.add(Dense(units=time_window_size, activation='linear')) model.compile(optimizer='adam', loss='mean_squared_error', metrics=[metric]) # model.compile(optimizer='adam', loss='mean_squared_error', metrics=[metric]) # model.compile(optimizer="sgd", loss="mse", metrics=[metric]) print(model.summary()) return model
开发者ID:chen0040,项目名称:keras-anomaly-detection,代码行数:20,代码来源:recurrent.py
示例2: downsampling# 需要导入模块: from keras import layers [as 别名]# 或者: from keras.layers import MaxPooling1D [as 别名]def downsampling(inputs, pool_type='max'): """ In addition, downsampling with stride 2 essentially doubles the effective coverage (i.e., coverage in the original document) of the convolution kernel; therefore, after going through downsampling L times, associations among words within a distance in the order of 2L can be represented. Thus, deep pyramid CNN is computationally ef Python layers.GRU属性代码示例 Python layers.Conv2DTranspose方法代码示例
|