Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ stage('Integration Test') {
}
},
'docs: GPU': {
node('GPU') {
node('TensorCore') {
ws(per_exec_ws("tvm/docs-python-gpu")) {
init_git()
unpack_lib('gpu', tvm_multilib)
Expand Down
9 changes: 7 additions & 2 deletions tutorials/frontend/deploy_prequantized_tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,13 @@ def get_real_image(im_height, im_width):
tflite_model_file = os.path.join(model_dir, "mobilenet_v2_1.0_224_quant.tflite")
tflite_model_buf = open(tflite_model_file, "rb").read()

tflite_model = tflite.Model.GetRootAsModel(tflite_model_buf, 0)

# Get TFLite model from buffer
try:
import tflite
tflite_model = tflite.Model.GetRootAsModel(tflite_model_buf, 0)
except AttributeError:
import tflite.Model
tflite_model = tflite.Model.Model.GetRootAsModel(tflite_model_buf, 0)

###############################################################################
# Lets run TFLite pre-quantized model inference and get the TFLite prediction.
Expand Down