Commit ·
cadeb4d
1
Parent(s): b255650
Upload infer.sh
Browse files
infer.sh
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash -
|
| 2 |
+
#===============================================================================
|
| 3 |
+
#
|
| 4 |
+
# FILE: infer.sh
|
| 5 |
+
#
|
| 6 |
+
# USAGE: ./infer.sh
|
| 7 |
+
#
|
| 8 |
+
# DESCRIPTION:
|
| 9 |
+
#
|
| 10 |
+
# OPTIONS: ---
|
| 11 |
+
# REQUIREMENTS: ---
|
| 12 |
+
# BUGS: ---
|
| 13 |
+
# NOTES: ---
|
| 14 |
+
# AUTHOR: fuliucansheng (fuliu), fuliucansheng@gmail.com
|
| 15 |
+
# ORGANIZATION:
|
| 16 |
+
# CREATED: 05/18/2023 22:50
|
| 17 |
+
# REVISION: ---
|
| 18 |
+
#===============================================================================
|
| 19 |
+
|
| 20 |
+
set -o nounset # Treat unset variables as an error
|
| 21 |
+
|
| 22 |
+
InputFile=$_InputFilePath_
|
| 23 |
+
OutputFile=$_OutputFilePath_
|
| 24 |
+
|
| 25 |
+
pip --no-cache-dir install --upgrade git+https://dev.azure.com/decui/_git/unitorch@dlis --user
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
unitorch-infer $1 --test_file $InputFile --output_file $OutputFile --test_batch_size $2
|
| 29 |
+
|
| 30 |
+
if [ $? -ne 0 ];then
|
| 31 |
+
touch $_CompleteFilePath_
|
| 32 |
+
touch $_ErrorsFilePath_
|
| 33 |
+
fi
|