Skip to content

Commit

Permalink
Accidently removed this function in the rebase...
Browse files Browse the repository at this point in the history
Signed-off-by: Dhruva Ray <[email protected]>
  • Loading branch information
dhruvaray committed May 8, 2020
1 parent 63ddd0d commit a116c76
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/python/frontend/tflite/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ def get_real_image(im_height, im_width):
data = np.reshape(x, (1, im_height, im_width, 3))
return data

def get_real_image_object_detection(im_height, im_width):
repo_base = 'https://github.com/dmlc/web-data/raw/master/gluoncv/detection/'
img_name = 'street_small.jpg'
image_url = os.path.join(repo_base, img_name)
img_path = download_testdata(image_url, img_name, module='data')
image = Image.open(img_path).resize((im_height, im_width))
x = np.array(image).astype('uint8')
data = np.reshape(x, (1, im_height, im_width, 3))
return data

def run_tvm_graph(tflite_model_buf, input_data, input_node, num_output=1, target='llvm',
out_names=None):
""" Generic function to compile on relay and execute on tvm """
Expand Down

0 comments on commit a116c76

Please sign in to comment.