glove.py 文件源码

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

项目:gram 作者: mp2893 项目源码 文件源码
def build_model(tparams, options):
    weightVector = T.vector('weightVector', dtype=theano.config.floatX)
    iVector = T.vector('iVector', dtype='int32')
    jVector = T.vector('jVector', dtype='int32')
    cost = weightVector * (((tparams['w'][iVector] * tparams['w_tilde'][jVector]).sum(axis=1) + tparams['b'][iVector] + tparams['b_tilde'][jVector] - T.log(weightVector)) ** 2)

    return weightVector, iVector, jVector, cost.sum()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号