Traceback (most recent call last):
File "d:\Codes\Pytorch_Retinaface\detection_core\main_detector.py", line 2074, in <module>
run_test()
File "d:\Codes\Pytorch_Retinaface\detection_core\main_detector.py", line 2065, in run_test
run_capture_sfd()
File "d:\Codes\Pytorch_Retinaface\detection_core\main_detector.py", line 2002, in run_capture_sfd
after_detection_fn=None)
File "Pytorch\detection_core\main_detector.py", line 1523, in __init__
self._init()
File "Pytorch\detection_core\main_detector.py", line 1536, in _init
traced = torch.jit.trace(self.detector, test_imgs, check_trace=False)
File "C:\Users\User\Anaconda3\lib\site-packages\torch\jit\__init__.py", line 911, in trace
name = _qualified_name(func)
File "C:\Users\User\Anaconda3\lib\site-packages\torch\_jit_internal.py", line 683, in _qualified_name
name = obj.__name__
AttributeError: 'FaceAlignment' object has no attribute '__name__'
Whats wrong?
As far as I know all classes has __name__ attribute, including the mentioned class in the error.(the name is ‘FaceAlignment’ obviously)
So I’m not sure why I’m getting this. Any help is greatly appreciated.
Thanks for doing some investigation! Are you able to share the binary for cached_weights_s3fd.pt so we can try to debug this on our end?
I think what you’re seeing here is some initialization the jit does when you first call torch.jit.script or torch.jit.trace. We have to grab the qualified names for a few modules that have overloaded forward methods (only nn.LSTM and nn.GRU), which is what you’re seeing. You could try setting a breakpoint and skipping past these calls to get to the time it’s actually invoked with your class.