deep-high-resolution-net.pytorch icon indicating copy to clipboard operation
deep-high-resolution-net.pytorch copied to clipboard

Change float datatype

Open marius-ne opened this issue 11 months ago • 0 comments

Hello everybody,

when trying it your great package on the mpii dataset I get this error (when running train.py like described in the README):

Traceback (most recent call last):
  File "/.../tools/train.py", line 223, in <module>
    main()
  File "/.../tools/train.py", line 126, in main
    train_dataset = eval('dataset.'+cfg.DATASET.DATASET)(
  File "/.../tools/../lib/dataset/mpii.py", line 36, in __init__
    self.db = self._get_db()
  File "/.../tools/../lib/dataset/mpii.py", line 55, in _get_db
    c = np.array(a['center'], dtype=np.float)
  File "/usr/local/lib/python3.10/dist-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

I therefore suggest opening a pull-request on this issue to change from np.float to float.

Let me know what you think.

marius-ne avatar Nov 26 '24 18:11 marius-ne