diff options
author | Rickard Bolin <rickard.bolin@arm.com> | 2022-12-19 12:56:17 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2022-12-22 10:24:40 +0000 |
commit | 5fdcf1753fc803a6baeb8eb1fc97c7df5a6e95ac (patch) | |
tree | 77aed7342fdb198b480b16fbd6355cd2d4ba8df3 /ethosu/vela/tflite_graph_optimiser.py | |
parent | af1d443159ce12cc03a5721a5db0150ec39d8489 (diff) | |
download | ethos-u-vela-5fdcf1753fc803a6baeb8eb1fc97c7df5a6e95ac.tar.gz |
MLBEDSW-7203: Data type alias deprecations
Deprecation of some data type aliases in NumPy version 1.24.0 caused Vela
to crash when using Python version 3.8 or above. Replaced the deprecated
aliases.
Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
Change-Id: Ide167ee864a340194ec5e69537c8718192c78ace
Diffstat (limited to 'ethosu/vela/tflite_graph_optimiser.py')
-rw-r--r-- | ethosu/vela/tflite_graph_optimiser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index 36c1de5a..242f0ea6 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -918,8 +918,8 @@ def convert_prelu(op, arch, nng): alpha_zp = alpha.quantization.zero_point alpha_scale = alpha.quantization.scale_f32 # If all alpha values are the same the PReLU can be converted to LeakyRelu - alpha_min = (alpha.values.min().astype(np.int) - alpha_zp) * alpha_scale - alpha_max = (alpha.values.max().astype(np.int) - alpha_zp) * alpha_scale + alpha_min = (alpha.values.min().astype(int) - alpha_zp) * alpha_scale + alpha_max = (alpha.values.max().astype(int) - alpha_zp) * alpha_scale if alpha_min == alpha_max: # or even a Relu if alpha_min == 0: |