What is the purpose of weights and biases in tensorflow word2vec example?

前端 未结 3 1514
渐次进展
渐次进展 2021-01-11 23:31

I\'m trying to understand how word2vec example works and don\'t really understand what is the purpose of weights and biases passed into nse_loss function. There are two vari

3条回答
  •  逝去的感伤
    2021-01-11 23:43

    Weights and biases are updated here:

    _, loss_val = session.run([optimizer, loss], feed_dict=feed_dict)

    The optimizer does the following - computes the gradient and then does the update step.

    The similarity is a separate computation is called in a different location and is used to validate the results. Which happens in the following section of code:

    if step % 10000 == 0: sim = similarity.eval()

    The validation of the embedding relies upon the similarity embedding.

提交回复
热议问题