TrainData_PT_recur.py 文件源码

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

项目:DeepJet 作者: mstoye 项目源码 文件源码
def base_model(input_shapes):
        from keras.layers import Input
        from keras.layers.core import Masking
        x_global  = Input(shape=input_shapes[0])
        x_charged = Input(shape=input_shapes[1])
        x_neutral = Input(shape=input_shapes[2])
        x_ptreco  = Input(shape=input_shapes[3])
        lstm_c = Masking()(x_charged)
        lstm_c = LSTM(100,go_backwards=True,implementation=2)(lstm_c)
        lstm_n = Masking()(x_neutral)
        lstm_n = LSTM(100,go_backwards=True,implementation=2)(lstm_n)
        x = concatenate( [lstm_c, lstm_n, x_global] )
        x = Dense(200, activation='relu',kernel_initializer='lecun_uniform')(x)
        x = Dense(100, activation='relu',kernel_initializer='lecun_uniform')(x)
        x = Dense(100, activation='relu',kernel_initializer='lecun_uniform')(x)
        x = Dense(100, activation='relu',kernel_initializer='lecun_uniform')(x)
        x = Dense(100, activation='relu',kernel_initializer='lecun_uniform')(x)
        x = Dense(100, activation='relu',kernel_initializer='lecun_uniform')(x)
        x = concatenate([x, x_ptreco])
        return [x_global, x_charged, x_neutral, x_ptreco], x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号