Giter Site home page Giter Site logo

Inference about moel HOT 7 CLOSED

hltchkust avatar hltchkust commented on August 23, 2024
Inference

from moel.

Comments (7)

manzar96 avatar manzar96 commented on August 23, 2024

Did you finally find the way?

from moel.

zlinao avatar zlinao commented on August 23, 2024

Hi, sorry for late reply. I added a simple interact script. Try the following command:
python3 interact.py --model experts --label_smoothing --noam --emb_dim 300 --hidden_dim 300 --hop 1 --heads 2 --topk 5 --cuda --pretrain_emb --softmax --basic_learner --save_path save/checkpoint

from moel.

Rasipuram avatar Rasipuram commented on August 23, 2024

Thank you for sharing the code. But got this error while running the interact.py code

TypeError: 'Transformer_experts' object is not subscriptable

Requirements are installed.

Thanks and regards

from moel.

zlinao avatar zlinao commented on August 23, 2024

Hi, can you share the full error message?

from moel.

Rasipuram avatar Rasipuram commented on August 23, 2024

Please find the message.loading weights
Traceback (most recent call last):
File "interact.py", line 69, in
model = Transformer_experts(vocab,decoder_number=program_number, model_file_path=config.save_path, is_eval=True)
File "/home/ubuntu/Desktop/Sowmya/Conversation/MoEL_NO_DATA/model/transformer_mulexpert.py", line 363, in init
self.encoder.load_state_dict(state['encoder_state_dict'])
TypeError: 'Transformer_experts' object is not subscriptable

Thanks and regards

from moel.

zlinao avatar zlinao commented on August 23, 2024

What command did you run? Did you give the correct model checkpoint? python3 interact.py --model experts --label_smoothing --noam --emb_dim 300 --hidden_dim 300 --hop 1 --heads 2 --topk 5 --cuda --pretrain_emb --softmax --basic_learner --save_path save/checkpoint

from moel.

Rasipuram avatar Rasipuram commented on August 23, 2024

Yes. It worked. Thank you very much.

from moel.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.