undertheseanlp / playground

Open Vietnamese NLP Experiments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

huấn luyện mô hình fasttext

quynhvan opened this issue · comments

Khi em chạy lệnh huấn luyện mô hình python train.py --train data/train.txt --s snapshots với file train.py nằm ở classification/egs/vntc_fasttext/train.py thì báo lỗi sau ạ

Traceback (most recent call last):
File "train.py", line 20, in
fasttext.train_supervised(train_path, '{}/model'.format(serialization_dir))
File "/home/van/anaconda3/lib/python3.7/site-packages/fasttext/FastText.py", line 429, in train_supervised
a = _build_args(params)
File "/home/van/anaconda3/lib/python3.7/site-packages/fasttext/FastText.py", line 333, in _build_args
setattr(a, k, v)
TypeError: (): incompatible function arguments. The following argument types are supported:
1. (self: fasttext_pybind.args, arg0: float) -> None

Invoked with: <fasttext_pybind.args object at 0x7f6bbed0c030>, '/home/van/Download/classification/egs/vntc_fasttext/snapshots/model'

@quynhvan

Mình vừa cập nhật lại tutorial về huấn luyện hàm phân loại. Bạn xem ở đây nhé

https://github.com/undertheseanlp/playground/tree/master/plays/classification#training-a-vietnamese-text-classifier