Comments (4)
Here is the detailed error message.
/usr/local/lib/python3.7/dist-packages/ipykernel_launcher.py:13: DeprecationWarning: np.int
is a deprecated alias for the builtin int
. To silence this warning, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
del sys.path[0]
AttributeError Traceback (most recent call last)
in ()
17 img_tensor = test_transforms(Image.fromarray(face_img))
18 img_tensor.unsqueeze_(0)
---> 19 scores = model(img_tensor.to(device))
20 scores=scores[0].data.cpu().numpy()
21 plt.figure(figsize=(3, 3))
11 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1109 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110 return forward_call(*input, **kwargs)
1111 # Do not call functions when jit is used
1112 full_backward_hooks, non_full_backward_hooks = [], []
/usr/local/lib/python3.7/dist-packages/timm/models/efficientnet.py in forward(self, x)
518
519 def forward(self, x):
--> 520 x = self.forward_features(x)
521 x = self.global_pool(x)
522 if self.drop_rate > 0.:
/usr/local/lib/python3.7/dist-packages/timm/models/efficientnet.py in forward_features(self, x)
511 x = self.bn1(x)
512 x = self.act1(x)
--> 513 x = self.blocks(x)
514 x = self.conv_head(x)
515 x = self.bn2(x)
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1109 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110 return forward_call(*input, **kwargs)
1111 # Do not call functions when jit is used
1112 full_backward_hooks, non_full_backward_hooks = [], []
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py in forward(self, input)
139 def forward(self, input):
140 for module in self:
--> 141 input = module(input)
142 return input
143
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1109 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110 return forward_call(*input, **kwargs)
1111 # Do not call functions when jit is used
1112 full_backward_hooks, non_full_backward_hooks = [], []
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py in forward(self, input)
139 def forward(self, input):
140 for module in self:
--> 141 input = module(input)
142 return input
143
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1109 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110 return forward_call(*input, **kwargs)
1111 # Do not call functions when jit is used
1112 full_backward_hooks, non_full_backward_hooks = [], []
/usr/local/lib/python3.7/dist-packages/timm/models/efficientnet_blocks.py in forward(self, x)
120 x = self.act1(x)
121
--> 122 x = self.se(x)
123
124 x = self.conv_pw(x)
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1109 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110 return forward_call(*input, **kwargs)
1111 # Do not call functions when jit is used
1112 full_backward_hooks, non_full_backward_hooks = [], []
/usr/local/lib/python3.7/dist-packages/timm/models/efficientnet_blocks.py in forward(self, x)
45 x_se = self.act1(x_se)
46 x_se = self.conv_expand(x_se)
---> 47 return x * self.gate(x_se)
48
49
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in getattr(self, name)
1184 return modules[name]
1185 raise AttributeError("'{}' object has no attribute '{}'".format(
-> 1186 type(self).name, name))
1187
1188 def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None:
AttributeError: 'SqueezeExcite' object has no attribute 'gate'
from face-emotion-recognition.
Please, check that you have the timm package version 0.4.5 (see readme). They changed EfficientNet in the latest package after I trained my models
from face-emotion-recognition.
Thanks for your help, it is now up and running, thanks for the excellent work you did.
from face-emotion-recognition.
Ok, nice, I'm closing the issue
from face-emotion-recognition.
Related Issues (20)
- Why is multi-task learning one head? HOT 2
- afew test accuracy is around 55% HOT 4
- Accuracy on AffectNet is worse than expected HOT 3
- running code on colab HOT 4
- Time of training HOT 9
- specifications of computer HOT 2
- Missing enet_b0_8_va_mtl.ptl HOT 2
- 'DepthwiseSeparableConv' object has no attribute 'act1'
- question about training on my own data HOT 3
- range of valence and arousal HOT 4
- How to apply Adaptive Frame Rate model on new dataset? HOT 1
- Fine tuning code HOT 2
- Request for a demo code HOT 3
- Request for guidelines on training on multitask classification HOT 2
- Request for help in the Training Script for enet_b0_8_best_afew.onnx model HOT 2
- docker image HOT 3
- Is it possible to predict action units? HOT 4
- Realtime Performance
- Additional files HOT 4
- Problem with the version of TensorFlow. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from face-emotion-recognition.