tqchen commented on a change in pull request #3200: [WIP][ANDROID][APPS] 
Real-Time Android Camera Demo Sample App
URL: https://github.com/apache/incubator-tvm/pull/3200#discussion_r360682331
 
 

 ##########
 File path: apps/android_camera/models/prepare_model.py
 ##########
 @@ -0,0 +1,96 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import logging
+
+import mxnet as mx
+import tvm
+import nnvm.frontend
+import nnvm.compiler
+from mxnet import gluon
+from mxnet.gluon.model_zoo import vision
+from tvm import relay
+from tvm.contrib import ndk
+import os
+
+
+target_host =  'llvm -target=arm64-linux-android'
+
+def get_model(model_name, batch_size=1):
+    gluon_model = vision.get_model(model_name, pretrained=True)
+    img_size = 299 if model_name == 'inceptionv3' else 224
+    data_shape = (batch_size, 3, img_size, img_size)
+    net, params = relay.frontend.from_mxnet(gluon_model, {"data": data_shape})
+    with relay.build_config(opt_level=3):
 
 Review comment:
   as of v0.7 cycle we will start to remove nnvm, please remove the function 
and only add relay support instead

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to