lanwuwei / SPM_toolkit

Neural network toolkit for sentence pair modeling.
302 stars 70 forks source link

why i had trained PWIN model and saved it,but it could not be used. #25

Closed BruceLee66 closed 5 years ago

BruceLee66 commented 5 years ago

model=torch.load('model.pkl') model.eval() en='This argument is irrational and lacks objectivity.' it='Tale argomentazione manca di razionalità e di obiettività.' eng=ps.handle_sen(en,'english') iti=ps.handle_sen(it,'italian') a,b=model(eng,iti,1)

lanwuwei commented 5 years ago

Bilingual case? You need to make sure the vocabulary has both English and Italian word types, as well as the word embeddings between word index and vector.