diff --git a/mace/examples/mace_run.cc b/mace/examples/mace_run.cc index aedcbfbcb64999074a6aa75670b12508fa45751a..cb285ad34b3d7ba3667bfacaf60e0b20c77e7d16 100644 --- a/mace/examples/mace_run.cc +++ b/mace/examples/mace_run.cc @@ -21,7 +21,7 @@ using namespace std; using namespace mace; namespace mace { -extern NetDef CreateGCN512(); +extern NetDef MACE_MODEL_FUNCTION(); } void ParseShape(const string &str, vector *shape) { string tmp = str; @@ -95,7 +95,7 @@ int main(int argc, char **argv) { // NetDef net_def; // net_def.ParseFromIstream(&file_stream); // file_stream.close(); - NetDef net_def = mace::CreateGCN512(); + NetDef net_def = mace::MACE_MODEL_FUNCTION(); DeviceType device_type = ParseDeviceType(device); VLOG(0) << device_type; diff --git a/tools/validate_gcn.sh b/tools/validate_gcn.sh index 930e3e3becb3c1b3eca67cc628b1b49d218e7ce8..99a245a191ae45e4d59ec768df7cc6e12c4055e0 100644 --- a/tools/validate_gcn.sh +++ b/tools/validate_gcn.sh @@ -46,10 +46,12 @@ bazel-bin/mace/python/tools/tf_converter --input=${TF_MODEL_FILE_PATH} \ # Step 3: Run model on the phone echo "Step 3: Run model on the phone" +echo Create${MODEL_TAG} bazel build -c opt --strip always mace/examples:mace_run \ --crosstool_top=//external:android/crosstool \ --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \ - --cpu=arm64-v8a + --cpu=arm64-v8a \ + --copt=-DMACE_MODEL_FUNCTION=Create${MODEL_TAG} adb shell "mkdir -p ${PHONE_DATA_DIR}" adb shell "mkdir -p ${KERNEL_DIR}"