oposum
oposum copied to clipboard
When would the code to train and test models be added?
I am also trying to run this code for the MATE model.
After running prep_mate.sh I continued with the following :
python prep_hdf5.py --w2v ../w2v/tv.bin --name ../data/preprocessed/TV_MATE --data ../data/train/tv.trn --lemmatize
python prep_hdf5_test.py --data ../data/gold/aspects/tv-tst.asp --name ../data/preprocessed/TV_MATE_TEST --vocab ../data/preprocessed/TV_MATE_word_mapping.txt --products ../data/preprocessed/TV_MATE_product_mapping.txt --lemmatize
if running on python 3.6 , in prep_hdf5.py and prep_hdf5_test.py this line (line 186 in prep_hdf5_test, and 302 in prep_hdf5) data, labels, products, scodes, original = zip(*sorted(sample(zip(data, labels, products, scodes, original), len(data)),key=lambda x:len(x[0])))
should be changed to this: data, labels, products, scodes, original = zip(*sorted(sample(zip(data, labels, products, scodes, original), len(data)),key=lambda x:len(x[0])))
data, products, scodes, original = zip(*sorted(sample(list(zip(data, products, scodes, original)) , len(data)),key=lambda x:len(x[0])))
Also the following lines
scodes.append(scode) original.append(orig[i])
should be changed to the following (because of the No conversion path for dtype: dtype error)
scodes.append(scode.encode('utf8')) original.append(orig[i].encode('utf8'))
Hi raspberryjoy, Do you know any script example for training/evaluating the model?
Hi raspberryjoy, Do you know any script example for training/evaluating the model?
Hello, I am trying to train the aspect encoder using the following command.
python mate.py ../data/preprocessed/TV_MATE --test_data ../data/preprocessed/TV_MATE_TEST --min_len 2 --aspects 10 --aspect_seeds ../data/seeds/tv.5-weights.txt --recon_method centr --kmeans --kmeans_iter 5 --attention --negative 20 --fix_w_emb --fix_a_emb --epochs 10 --lr 0.001 --l 1
Thank you :)
Hi raspberryjoy, Do you know any script example for training/evaluating the model?
Hello, I am trying to train the aspect encoder using the following command.
python mate.py ../data/preprocessed/TV_MATE --test_data ../data/preprocessed/TV_MATE_TEST --min_len 2 --aspects 10 --aspect_seeds ../data/seeds/tv.5-weights.txt --recon_method centr --kmeans --kmeans_iter 5 --attention --negative 20 --fix_w_emb --fix_a_emb --epochs 10 --lr 0.001 --l 1
Thank you for your response. Another question; Did you get F1~ 50% for aspect extraction using mate model? the result I'm getting is really bad ( less than 20%)
I have not been able to evaluate the model. I am still having some issues trainning the mate model in my cuda setup.
Did you pursue this further and were able to train/evaluate the models?
Hello, No, I gave up ...