Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2720,6 +2720,55 @@ set -x
fi
}


function hybrid_paddlex() {
# PaddleX test
export DEVICE=($(echo $HIP_VISIBLE_DEVICES | tr "," "\n"))
git clone --depth=1000 https://gitee.com/paddlepaddle/PaddleX.git
cd PaddleX
pip install -e .
paddlex --install PaddleClas
paddlex --install PaddleSeg
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/data/cls_flowers_examples.tar -P ./dataset
tar -xf ./dataset/cls_flowers_examples.tar -C ./dataset/
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/data/seg_optic_examples.tar -P ./dataset
tar -xf ./dataset/seg_optic_examples.tar -C ./dataset/

# train Reset50
echo "Start Reset50"
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/cls_flowers_examples \
-o Global.output=resnet50_output \
-o Global.device="gpu:${HIP_VISIBLE_DEVICES}" \
-o Train.epochs_iters=2

# inference Reset50
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./resnet50_output/best_model/inference" \
-o Global.device="gpu:${DEVICE[0]}"
echo "End Reset50"

echo "Start DeepLabv3+"
# train DeepLabv3+
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
-o Global.mode=train \
-o Global.dataset_dir=./dataset/seg_optic_examples \
-o Global.output=deeplabv3p_output \
-o Global.device="gpu:${HIP_VISIBLE_DEVICES}" \
-o Train.epochs_iters=2

# inference DeepLabv3+
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./deeplabv3p_output/best_model/inference" \
-o Global.device="gpu:${DEVICE[0]}"
echo "End DeepLabv3+"

}


function parallel_fa_unit() {
if [ ${WITH_TESTING:-ON} == "ON" ] ; then
cat <<EOF
Expand Down Expand Up @@ -4674,6 +4723,7 @@ function main() {
;;
hyg_dcu_test)
parallel_test
hybrid_paddlex
;;
nv_cicheck_coverage)
parallel_test
Expand Down