model_library.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:CIAN 作者: yanghanxy 项目源码 文件源码
def CNN(seq_length, length, input_size, feature_maps, kernels, x):
    concat_input = []
    for feature_map, kernel in zip(feature_maps, kernels):
        reduced_l = length - kernel + 1
        conv = Conv2D(feature_map, (1, kernel), activation='tanh', data_format="channels_last")(x)
        maxp = MaxPooling2D((1, reduced_l), data_format="channels_last")(conv)
        concat_input.append(maxp)
    con = Concatenate()(concat_input)
    con = Reshape((seq_length, sum(feature_maps)))(con)
    return con
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号