aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/weight_compressor.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/weight_compressor.py')
-rw-r--r--ethosu/vela/weight_compressor.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py
index 93000408..8ebd7511 100644
--- a/ethosu/vela/weight_compressor.py
+++ b/ethosu/vela/weight_compressor.py
@@ -76,6 +76,8 @@ class CompressedWeightCache:
def encode(weight_stream):
+ if len(weight_stream) == 0:
+ return []
assert np.amin(weight_stream) >= -255
assert np.amax(weight_stream) <= 255