240 發(fā)簡(jiǎn)信
IP屬地:臺(tái)灣
  • hello, xlvector. I read your implementation, there is some parts I could not full understand. I am not sure whether you could give me more detailed descriptions for the codes below :

    class NceAuc(mx.metric.EvalMetric):
    def __init__(self):
    super(NceAuc, self).__init__('nce-auc')

    def update(self, labels, preds):
    label_weight = labels[1].asnumpy()
    preds = preds[0].asnumpy()
    tmp = []
    for i in range(preds.shape[0]):
    for j in range(preds.shape[1]):
    tmp.append((label_weight[i][j], preds[i][j]))
    tmp = sorted(tmp, key = itemgetter(1), reverse = True)
    m = 0.0
    n = 0.0
    z = 0.0
    k = 0
    for a, b in tmp:
    if a > 0.5:
    m += 1.0
    z += len(tmp) - k
    else:
    n += 1.0
    k += 1
    z -= m * (m + 1.0) / 2.0
    z /= m
    z /= n
    self.sum_metric += z
    self.num_inst += 1

    word2vec/lstm on mxnet with NCE loss

    Softmax是用來實(shí)現(xiàn)多類分類問題常見的損失函數(shù)。但如果類別特別多簇搅,softmax的效率就是個(gè)問題了黍匾。比如在word2vec里,每個(gè)詞都是一個(gè)類別现喳,在這種情況下可能有100...

  • Y君的求職歷險(xiǎn)記

    (純屬虛構(gòu)诫欠,如有雷同,歡迎斗圖) 這次要分享的故事的主人公暫且稱其為Y君浴栽。 Y君基本情況: - 酷愛音樂荒叼、健身(跑得了馬拉松,玩的轉(zhuǎn)擊劍)典鸡、交友(歡迎童顏美女勾搭) - 本...

亚洲A日韩AV无卡,小受高潮白浆痉挛av免费观看,成人AV无码久久久久不卡网站,国产AV日韩精品