2017-05-22 93 views
2

paper on fasttext的監督分類,作者指定的不同數量的隱藏單元通過改變某些參數(h是在3,4頁的一個 - 你看在表1中「它有10個隱藏的單位,我們有和沒有雙字母組對其進行評估。「),但讀the documentation後它不會出現有一個‘隱藏單位’參數來改變。有沒有辦法指定隱藏單位的數量?或者這與指定-dim選項相同?指定的隱藏單元#Facebook中fasttext

+0

從Facebook羣組頁面:我想問一下,使用Fasttext進行分類時,在神經網絡SOFTMAX使用什麼節點的數量? --number在SOFTMAX層節點是相同的類(或更多一點分層SOFTMAX)號碼。再有就是它的大小是由你(機智-dim)設置隱藏層.--這是下面這樣接受的答案是一致的。 –

回答

0

k是否定的。類

https://arxiv.org/pdf/1607.01759v3.pdf

第2.1節更準確地說,計算複雜度是O(KH),其中k是類和h的文本表示的維數。


當在文本分類預測類,從docs

的參數k是可選的,並且是通過默認等於1。 爲了獲得K中某一段文字,最有可能的標籤,使用:

$ ./fasttext預測model.bin的test.txtķ


當訓練模型,執行與__label__*標籤指導訓練時,這是隱含在訓練數據中指定。

example tutorial

$ wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/cooking.stackexchange.tar.gz && tar xvzf cooking.stackexchange.tar.gz 
--2017-05-23 09:03:26-- https://s3-us-west-1.amazonaws.com/fasttext-vectors/cooking.stackexchange.tar.gz 
Resolving s3-us-west-1.amazonaws.com... 54.231.236.45 
Connecting to s3-us-west-1.amazonaws.com|54.231.236.45|:443... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 457609 (447K) [application/x-gzip] 
Saving to: ‘cooking.stackexchange.tar.gz.1’ 

cooking.stackexchange.tar.gz.1  100%[================================================================>] 446.88K 385KB/s in 1.2s  

2017-05-23 09:03:28 (385 KB/s) - ‘cooking.stackexchange.tar.gz.1’ saved [457609/457609] 

x cooking.stackexchange.id 
x cooking.stackexchange.txt 
x readme.txt 


$ cat readme.txt 
The data in this archive is derived from the user-contributed content on the 
Cooking Stack Exchange website (https://cooking.stackexchange.com/), used under 
CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/). 

The original data dump can be downloaded from: 
https://archive.org/download/stackexchange/cooking.stackexchange.com.7z 
and details about the dump obtained from: 
https://archive.org/details/stackexchange 

We distribute two files, under CC-BY-SA 3.0: 

- cooking.stackexchange.txt, which contains all question titles and 
    their associated tags (one question per line, tags are prefixed by 
    the string "__label__") ; 

- cooking.stackexchange.id, which contains the corresponding row IDs, 
    from the original data dump. 
相關問題