From 4492fe657beccd80c0bec11ccb1fd973d5c6c26a Mon Sep 17 00:00:00 2001 From: Wu Zhao Date: Fri, 1 Feb 2019 01:50:56 +0800 Subject: [PATCH] [TFLite][Python 2] Solve TFLite frontend python 2 compatibility and Modify TFLite whl files path (#2529) --- python/tvm/relay/frontend/tflite.py | 2 +- tutorials/frontend/from_tflite.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tvm/relay/frontend/tflite.py b/python/tvm/relay/frontend/tflite.py index 3c926d915fdd..d52c941e50f7 100644 --- a/python/tvm/relay/frontend/tflite.py +++ b/python/tvm/relay/frontend/tflite.py @@ -546,7 +546,7 @@ def get_pad_value(data, kernel, stride): pad tuple of value """ - out = math.ceil(float(data) / float(stride)) + out = int(math.ceil(float(data) / float(stride))) pad = max(0, (out - 1) * stride + kernel - data) pad_before = pad // 2 pad_after = pad - pad_before diff --git a/tutorials/frontend/from_tflite.py b/tutorials/frontend/from_tflite.py index 96068e8a2188..cfa18af291b1 100644 --- a/tutorials/frontend/from_tflite.py +++ b/tutorials/frontend/from_tflite.py @@ -18,11 +18,11 @@ .. code-block:: bash # For python3: - wget https://github.com/dmlc/web-data/tree/master/tensorflow/tflite/whl/tflite-0.0.1-py3-none-any.whl + wget https://raw.githubusercontent.com/dmlc/web-data/master/tensorflow/tflite/whl/tflite-0.0.1-py3-none-any.whl pip install tflite-0.0.1-py3-none-any.whl --user # For python2: - wget https://github.com/dmlc/web-data/tree/master/tensorflow/tflite/whl/tflite-0.0.1-py2-none-any.whl + wget https://raw.githubusercontent.com/dmlc/web-data/master/tensorflow/tflite/whl/tflite-0.0.1-py2-none-any.whl pip install tflite-0.0.1-py2-none-any.whl --user