GithubHelp home page GithubHelp logo

alkasaliss / democlassi Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 18.0 15.74 MB

DEmoClassi stands for Demographic (age, gender, race) and Emotions (happy, sad, angry, ...) Classification from face images, using deep learning.

Home Page: https://alkasaliss.github.io/DEmoClassi/

License: MIT License

Python 16.87% Jupyter Notebook 83.13%
pytorch deep-learning emotion-detection pytorch-ignite race age gender

democlassi's People

Contributors

alkasaliss avatar dependabot[bot] 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

Watchers

 avatar  avatar

democlassi's Issues

state_dict error

Thanks for the awesome project! However, when I run the experiments_and_evaluation_utk_latest.ipynb file and trained the models myself, I had the following error:

RuntimeError Traceback (most recent call last)
in ()
9 cpu_or_gpu = "cuda" if torch.cuda.is_available() else "cpu"
10 sep_conv_model = SepConvModelMT()
---> 11 sep_conv_model.load_state_dict(torch.load(path_sep_conv, map_location=cpu_or_gpu))
12
13 resnet_model = PretrainedMT(model_name='resnet')

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
828 if len(error_msgs) > 0:
829 raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
--> 830 self.class.name, "\n\t".join(error_msgs)))
831 return _IncompatibleKeys(missing_keys, unexpected_keys)
832

RuntimeError: Error(s) in loading state_dict for SepConvModelMT:
Missing key(s) in state_dict: "conv_base.conv1.depthwise.weight", "conv_base.conv1.depthwise.bias", "conv_base.conv1.pointwise.weight", "conv_base.conv1.pointwise.bias", "conv_base.batchnorm1.weight", "conv_base.batchnorm1.bias", "conv_base.batchnorm1.running_mean", "conv_base.batchnorm1.running_var", "conv_base.conv2.depthwise.weight", "conv_base.conv2.depthwise.bias", "conv_base.conv2.pointwise.weight", "conv_base.conv2.pointwise.bias", "conv_base.batchnorm2.weight", "conv_base.batchnorm2.bias", "conv_base.batchnorm2.running_mean", "conv_base.batchnorm2.running_var", "conv_base.conv3.depthwise.weight", "conv_base.conv3.depthwise.bias", "conv_base.conv3.pointwise.weight", "conv_base.conv3.pointwise.bias", "conv_base.batchnorm3.weight", "conv_base.batchnorm3.bias", "conv_base.batchnorm3.running_mean", "conv_base.batchnorm3.running_var", "conv_base.conv4.depthwise.weight", "conv_base.conv4.depthwise.bias", "conv_base.conv4.pointwise.weight", "conv_base.conv4.pointwise.bias", "conv_base.batchnorm4.weight", "conv_base.batchnorm4.bias", "conv_base.batchnorm4.running_mean", "conv_base.batchnorm4.running_var", "conv_base.conv5.depthwise.weight", "conv_base.conv5.depthwise.bias", "conv_base.conv5.pointwise.weight", "conv_base.conv5.pointwise.bias", "conv_base.batchnorm5.weight", "conv_base.batchnorm5.bias", "conv_base.batchnorm5.running_mean", "conv_base.batchnorm5.running_var", "conv_base.conv6.depthwise.weight", "conv_base.conv6.depthwise.bias", "conv_base.conv6.pointwise.weig...
Unexpected key(s) in state_dict: "optimizer", "model".

running problem

when i run the second part: experiments_and_evaluation_utk_latest.ipynb
it has the error like:
Number of trainable parameters : 706,278
Number of non-trainable parameters : 0

RuntimeError Traceback (most recent call last)
in ()
4 resume_model=None, resume_optimizer=None, backup_step=5, backup_path=backup_path,
5 n_epochs_freeze=0, lr_after_freeze=None,
----> 6 loss_weights=[1/10, 1/0.16, 1/0.44])

7 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in convert(t)
382
383 def convert(t):
--> 384 return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
385
386 return self._apply(convert)

RuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 14.73 GiB total capacity; 12.95 GiB already allocated; 4.94 MiB free; 91.58 MiB cached)

does it has any thing to do with the batch_size and i can't find the way to change it . does any body can tell me how to fix it.

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.