Code Monkey home page Code Monkey logo

transformer-cnn-emotion-recognition's People

Contributors

iliazenkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

transformer-cnn-emotion-recognition's Issues

Notebook fails to load pre-trained models

I'm getting the following error in the Load the Trained Model from Checkpoint for Evaluation section when trying to load the pre-trained models in the repo.

# pick load folder  
load_folder = '/content/gdrive/My Drive/DL/models/checkpoints'  

# pick the epoch to load
epoch = '429'
model_name = f'parallel_all_you_wantFINAL-{epoch}.pkl'

# make full load path
load_path = os.path.join(load_folder, model_name)

## instantiate empty model and populate with params from binary 
model = parallel_all_you_want(len(emotions_dict))
load_checkpoint(optimizer, model, load_path)

print(f'Loaded model from {load_path}')

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-51-de60b48d9410> in <module>
     11 ## instantiate empty model and populate with params from binary
     12 model = parallel_all_you_want(len(emotions_dict))
---> 13 load_checkpoint(optimizer, model, load_path)
     14 
     15 print(f'Loaded model from {load_path}')

<ipython-input-50-2469ccaf4901> in load_checkpoint(optimizer, model, filename)
     11 def load_checkpoint(optimizer, model, filename):
     12     checkpoint_dict = torch.load(filename, map_location=torch.device('cpu'))
---> 13     epoch = checkpoint_dict['epoch']
     14     model.load_state_dict(checkpoint_dict['model'])
     15     if optimizer is not None:

KeyError: 'epoch'

It appears that the pre-trained model files were not generated using the structure expected by the notebook.

papers

Hi IliaZenkov:
I wanma quote your papers (traditional method and this method), you can send the DOI of your papers.
Looking forward to your reply

RuntimeError: mat1 dim 1 must match mat2 dim 0

Hi, congrats on the project!
I am getting this error, could not figure out what's going on:

File "/media/user/hk-data/PycharmProjects/dnn_embeddings_pytorch/train_model.py", line 148, in train_model
output = net(x_train)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/media/user/hk-data/PycharmProjects/dnn_embeddings_pytorch/dnn_models.py", line 240, in forward
output_logits = self.fc1_linear(complete_embedding)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 93, in forward
return F.linear(input, self.weight, self.bias)
File "/home/user/anaconda3/envs/general_py37/lib/python3.7/site-packages/torch/nn/functional.py", line 1690, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: mat1 dim 1 must match mat2 dim 0

different results

Thanks for the code.

I get different results than yours, even though I use the same dataset.

myresult

As you can see, the validation loss slightly increases with epocs, while it decreases in your result.
I didn't change any parameters or anything else in the code, only the directories.

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.