av-savchenko/face-emotion-recognition

Can not load pretrained models

DefTruth opened this issue · 3 comments

 File "/Users/xxx/Library/Python/3.8/lib/python/site-packages/timm/models/efficientnet_blocks.py", line 47, in forward
    return x * self.gate(x_se)
  File "/Users/xxx/Library/Python/3.8/lib/python/site-packages/torch/nn/modules/module.py", line 947, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'SqueezeExcite' object has no attribute 'gate'

Many thanks ~ I have solved this problem when i use timm==0.4.5 and successful reimplement the inference with c++.

Class Size From Awesome File Type State Usage
EfficientEmotion7 15M face-emo... 🔥↑ face::attr ✅️ demo & cpp
EfficientEmotion8 15M face-emo... 🔥↑ face::attr demo & cpp
MobileEmotion7 13M face-emo... 🔥↑ face::attr demo & cpp
ReXNetEmotion7 30M face-emo... 🔥↑ face::attr demo & cpp

Ok, thanks for letting me know and sharing your code!
Closing the issue now