python -m keras2ncnn -i path/to/my/model.h5 -o ./
Reading and parsing keras h5df file...
Start graph optimizing pass...
Removing unused nodes...
Removing squeeze reshape after pooling...
Refreshing graph...
Converting keras graph to ncnn graph...
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/mek101/.local/lib/python3.10/site-packages/keras2ncnn/__main__.py", line 12, in <module>
sys.exit(_main())
File "/home/mek101/.local/lib/python3.10/site-packages/keras2ncnn/keras2ncnn.py", line 69, in main
KerasConverter().parse_keras_graph(keras_graph, ncnn_graph, NcnnParamDispatcher())
File "/home/mek101/.local/lib/python3.10/site-packages/keras2ncnn/keras_converter.py", line 1412, in parse_keras_graph
eval(
File "/home/mek101/.local/lib/python3.10/site-packages/keras2ncnn/keras_converter.py", line 478, in BatchNormalization_helper
bn_params['bn_beta'] = np.full([num_output, ], 0, dtype=np.float)
File "/home/mek101/.local/lib/python3.10/site-packages/numpy/__init__.py", line 305, 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'?