tensorflow學習筆記各個函式解析
阿新 • • 發佈:2018-11-09
弄清以下問題的含義:
1.
tf.train.global_step
獲取全域性訓練步數, 由 各種損失函式優化器中的minimize()
方法負責自動加1
sess.run(
fetches,
feed_dict=None,
options=None,
run_metadata=None
)
-
fetches: A single graph element, a list of graph elements, or a
dictionary whose values are graph elements or lists of graph elements
(described above). -
feed_dict: A dictionary that maps graph elements
to values (described above). -
options: A [RunOptions] protocol buffer
-
run_metadata: A [RunMetadata] protocol buffer
翻譯一下: fetchs 是一個[] ,字典中的元素是計算圖中定義的元素,
feed_dict用來提供輸入引數
- word embedding 與one-hot 相比是連續的,可以表達出詞與詞之間的聯絡。 word2vec 可以高效獲得 word embedding 。 有兩種模型,一個叫CBOW,還有一個skip-gram 。 CBOW適用於小型資料,採用根據上下文預測目標詞。 而skip-gram 適用大型資料集 使用目標詞推測上下文
神經網路模型的結果使用 one-hot vector來表示