BlazeFace-PyTorch icon indicating copy to clipboard operation
BlazeFace-PyTorch copied to clipboard

Getting error - 'BlazeFace' object has no attribute 'load_weights'

Open ctippur opened this issue 5 years ago • 2 comments

Hello,

I am unable to load weights.

net.load_weights("blazeface.pth")

I am getting the below error.

---------------------------------------------------------------------------
ModuleAttributeError                      Traceback (most recent call last)
<ipython-input-29-cdf78203f6d0> in <module>
----> 1 net.load_weights("blazeface.pth")
      2 net.load_anchors("anchors.npy")
      3 
      4 # Optionally change the thresholds:
      5 net.min_score_thresh = 0.75

~/plaground/virtualenv/awslocal/lib/python3.7/site-packages/torch/nn/modules/module.py in __getattr__(self, name)
    770                 return modules[name]
    771         raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
--> 772             type(self).__name__, name))
    773 
    774     def __setattr__(self, name: str, value: Union[Tensor, 'Module']) -> None:

ModuleAttributeError: 'BlazeFace' object has no attribute 'load_weights'

ctippur avatar Oct 13 '20 16:10 ctippur

It works for me. What version of PyTorch are you using?

hollance avatar Oct 13 '20 17:10 hollance

Apologies for the delay.

PyTorch version: 1.6.0

ctippur avatar Oct 14 '20 15:10 ctippur