facebookresearch / InferSent

InferSent sentence embeddings
Other
2.28k stars 470 forks source link

InferSent Library Installing Issue #76

Closed MFarhatUllah closed 6 years ago

MFarhatUllah commented 6 years ago

i have python 3.6, pip 18.0 but when i run command "pip install InferSent" error comes out in " Could not find a version that satisfies the requirement InferSent (from versions: ) No matching distribution found for InferSent" i have separate environment named "pytorchA" and in have installed "pytorch" latest package through "conda install pytorch torchvision -c pytorch"

MFarhatUllah commented 6 years ago

Credit goes to Sir M. Sharjeel. its not a library. its a class written in model.py download clone from "https://github.com/facebookresearch/InferSent". copy its models.py file where your xyz.ipynb file is placed. then if we run the command " from models import InferSent MODEL_PATH = '../new_models/infersent1.pkl' params_model = {'bsize': 64, 'word_emb_dim': 300, 'enc_lstm_dim': 2048, 'pool_type': 'max', 'dpout_model': 0.0, 'version': 1} model = InferSent(params_model) model.load_state_dict(torch.load(MODEL_PATH)) " it is called from "model.py" as InferSent is the class of models.py error resolved.