Bug fix on resizing input image
The input tuple for resizing an image is (width, height). It should
correspnds to (input_shape[2], input_shape[1]).
In mobilenet/mnist, input width = height, so this issue was not captured
before.
Change-Id: I6cf61bca3e8e2f5c163c8e5dec414cf674105324
diff --git a/build_tools/gen_mlmodel_input.py b/build_tools/gen_mlmodel_input.py
index 213d508..fb87b3a 100755
--- a/build_tools/gen_mlmodel_input.py
+++ b/build_tools/gen_mlmodel_input.py
@@ -67,7 +67,7 @@
input = input[:np.prod(input_shape)].reshape(np.prod(input_shape))
else:
resized_img = Image.open(input_name).resize(
- (input_shape[1], input_shape[2]))
+ (input_shape[2], input_shape[1]))
input = np.array(resized_img).reshape(np.prod(input_shape))
if not is_quant:
low = np.min(float_input_range)