@@ -46,19 +46,28 @@ ${SPARK_HOME}/bin/spark-submit \
4646now=$( date " +%s" )
4747time1=$(( now- start))
4848
49- echo " #2 start example test for customized loss and layer (Funtional API) "
49+ echo " #2 start example test for autograd "
5050# timer
5151start=$( date " +%s" )
52+ echo " #2.1 start example test for custom layer"
5253${SPARK_HOME} /bin/spark-submit \
5354 --master ${MASTER} \
54- --driver-memory 20g \
55- --executor-memory 20g \
55+ --driver-memory 2g \
56+ --executor-memory 2g \
5657 --py-files ${ANALYTICS_ZOO_PYZIP} ,${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/autograd/custom.py \
5758 --jars ${ANALYTICS_ZOO_JAR} \
5859 --conf spark.driver.extraClassPath=${ANALYTICS_ZOO_JAR} \
5960 --conf spark.executor.extraClassPath=${ANALYTICS_ZOO_JAR} \
6061 ${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/autograd/custom.py \
6162 --nb_epoch 2
63+
64+ echo " #2.2 start example test for customloss"
65+ ${ANALYTICS_ZOO_HOME} /bin/spark-submit-python-with-zoo.sh \
66+ --master ${MASTER} \
67+ --driver-memory 2g \
68+ --executor-memory 2g \
69+ ${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/autograd/customloss.py
70+
6271now=$( date " +%s" )
6372time2=$(( now- start))
6473
@@ -437,8 +446,117 @@ ${ANALYTICS_ZOO_HOME}/bin/spark-submit-python-with-zoo.sh \
437446now=$( date " +%s" )
438447time10=$(( now- start))
439448
449+ echo " #11 start example test for openvino"
450+ # timer
451+ start=$( date " +%s" )
452+ if [ -f analytics-zoo-models/faster_rcnn_resnet101_coco_2018_01_28.tar.gz ]
453+ then
454+ echo " analytics-zoo-models/faster_rcnn_resnet101_coco already exists."
455+ else
456+ wget $FTP_URI /analytics-zoo-models/openvino/faster_rcnn_resnet101_coco_2018_01_28.tar.gz \
457+ -P analytics-zoo-models
458+ tar zxf analytics-zoo-models/faster_rcnn_resnet101_coco_2018_01_28.tar.gz -C analytics-zoo-models/
459+ fi
460+ if [ -d analytics-zoo-data/data/object-detection-coco ]
461+ then
462+ echo " analytics-zoo-data/data/object-detection-coco already exists"
463+ else
464+ wget $FTP_URI /analytics-zoo-data/data/object-detection-coco.zip -P analytics-zoo-data/data
465+ unzip -q analytics-zoo-data/data/object-detection-coco.zip -d analytics-zoo-data/data
466+ fi
467+ ${ANALYTICS_ZOO_HOME} /bin/spark-submit-python-with-zoo.sh \
468+ --master ${MASTER} \
469+ --driver-memory 10g \
470+ --executor-memory 10g \
471+ ${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/openvino/predict.py \
472+ --image analytics-zoo-data/data/object-detection-coco \
473+ --model analytics-zoo-models/faster_rcnn_resnet101_coco_2018_01_28
474+ now=$( date " +%s" )
475+ time11=$(( now- start))
476+
477+ echo " #12 start example for vnni/openvino"
478+ # timer
479+ start=$( date " +%s" )
480+ if [ -d analytics-zoo-models/vnni ]
481+ then
482+ echo " analytics-zoo-models/resnet_v1_50.xml already exists."
483+ else
484+ wget $FTP_URI /analytics-zoo-models/openvino/vnni/resnet_v1_50.zip \
485+ -P analytics-zoo-models
486+ unzip -q analytics-zoo-models/resnet_v1_50.zip -d analytics-zoo-models/vnni
487+ fi
488+ if [ -d analytics-zoo-data/data/object-detection-coco ]
489+ then
490+ echo " analytics-zoo-data/data/object-detection-coco already exists"
491+ else
492+ wget $FTP_URI /analytics-zoo-data/data/object-detection-coco.zip -P analytics-zoo-data/data
493+ unzip -q analytics-zoo-data/data/object-detection-coco.zip -d analytics-zoo-data/data
494+ fi
495+ ${ANALYTICS_ZOO_HOME} /bin/spark-submit-python-with-zoo.sh \
496+ --master ${MASTER} \
497+ --driver-memory 2g \
498+ --executor-memory 2g \
499+ ${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/vnni/openvino/predict.py \
500+ --model analytics-zoo-models/vnni/resnet_v1_50.xml \
501+ --image analytics-zoo-data/data/object-detection-coco
502+ now=$( date " +%s" )
503+ time12=$(( now- start))
504+
505+ echo " #13 start example test for streaming Object Detection"
506+ # timer
507+ start=$( date " +%s" )
508+ if [ -d analytics-zoo-data/data/object-detection-coco ]
509+ then
510+ echo " analytics-zoo-data/data/object-detection-coco already exists"
511+ else
512+ wget $FTP_URI /analytics-zoo-data/data/object-detection-coco.zip -P analytics-zoo-data/data
513+ unzip -q analytics-zoo-data/data/object-detection-coco.zip -d analytics-zoo-data/data/
514+ fi
515+
516+ if [ -f analytics-zoo-models/analytics-zoo_ssd-vgg16-300x300_COCO_0.1.0.model ]
517+ then
518+ echo " analytics-zoo-models/object-detection/analytics-zoo_ssd-vgg16-300x300_COCO_0.1.0.model already exists"
519+ else
520+ wget $FTP_URI /analytics-zoo-models/object-detection/analytics-zoo_ssd-vgg16-300x300_COCO_0.1.0.model \
521+ -P analytics-zoo-models
522+ fi
523+
524+ mkdir output
525+ mkdir stream
526+ while true
527+ do
528+ temp1=$( find analytics-zoo-data/data/object-detection-coco -type f| wc -l)
529+ temp2=$( find ./output -type f| wc -l)
530+ temp3=$(( $temp1 + $temp1 ))
531+ if [ $temp3 -eq $temp2 ]; then
532+ kill -9 $( ps -ef | grep StreamingObjectDetection | grep -v grep | awk ' {print $2}' )
533+ rm -r output
534+ rm -r stream
535+ break
536+ fi
537+ done &
538+ ${ANALYTICS_ZOO_HOME} /bin/spark-submit-python-with-zoo.sh \
539+ --master ${MASTER} \
540+ --driver-memory 2g \
541+ --executor-memory 2g \
542+ ${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/streaming/objectdetection/streaming_object_detection.py \
543+ --streaming_path ./stream \
544+ --model analytics-zoo-models/analytics-zoo_ssd-vgg16-300x300_COCO_0.1.0.model \
545+ --output_path ./output &
546+ ${ANALYTICS_ZOO_HOME} /bin/spark-submit-python-with-zoo.sh \
547+ --master ${MASTER} \
548+ --driver-memory 2g \
549+ --executor-memory 2g \
550+ ${ANALYTICS_ZOO_ROOT} /pyzoo/zoo/examples/streaming/objectdetection/image_path_writer.py \
551+ --streaming_path ./stream \
552+ --img_path analytics-zoo-data/data/object-detection-coco
553+
554+ now=$( date " +%s" )
555+ time13=$(( now- start))
556+
557+
440558echo " #1 textclassification time used: $time1 seconds"
441- echo " #2 customized loss and layer time used: $time2 seconds"
559+ echo " #2 autograd time used: $time2 seconds"
442560echo " #3 image-classification time used: $time3 seconds"
443561echo " #4 object-detection loss and layer time used: $time4 seconds"
444562echo " #5 nnframes time used: $time5 seconds"
@@ -447,3 +565,6 @@ echo "#7 anomalydetection time used: $time7 seconds"
447565echo " #8 qaranker time used: $time8 seconds"
448566echo " #9 inceptionV1 training time used: $time9 seconds"
449567echo " #10 pytorch time used: $time10 seconds"
568+ echo " #11 openvino time used: $time11 seconds"
569+ echo " #12 vnni/openvino time used: $time12 seconds"
570+ echo " #13 streaming Object Detection time used: $time13 seconds"
0 commit comments