convolutional.py 文件源码

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

项目:DeepJet 作者: mstoye 项目源码 文件源码
def convolutional_model_broad_reg(Inputs,nclasses,nregclasses,dropoutRate=-1):
    """
    the inputs are really not working as they are. need a reshaping well before
    """  
    cpf,npf,vtx = block_deepFlavourConvolutions(charged=Inputs[1],
                                                neutrals=Inputs[2],
                                                vertices=Inputs[3],
                                                dropoutRate=dropoutRate)


    cpf  = LSTM(150,go_backwards=True,implementation=2, name='cpf_lstm')(cpf)
    cpf = Dropout(dropoutRate)(cpf)

    npf = LSTM(50,go_backwards=True,implementation=2, name='npf_lstm')(npf)
    npf = Dropout(dropoutRate)(npf)

    vtx = LSTM(50,go_backwards=True,implementation=2, name='vtx_lstm')(vtx)
    vtx = Dropout(dropoutRate)(vtx)

    x = Concatenate()( [Inputs[0],cpf,npf,vtx,Inputs[4] ])

    x  = block_deepFlavourDense(x,dropoutRate)


    predictions = [Dense(nclasses, activation='softmax',kernel_initializer='lecun_uniform',name='ID_pred')(x),
                   Dense(nregclasses, activation='linear',kernel_initializer='ones',name='E_pred')(x)]

    model = Model(inputs=Inputs, outputs=predictions)
    return model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号