run.sh 560 字节
Newer Older
1 2 3 4 5 6 7 8 9
#!/bin/bash

set -x

PADDLE_ROOT=$1
TURN_ON_MKL=$2 # use MKL or Openblas

# download models
function download() {
10 11
    wget -q http://paddle-tar.bj.bcebos.com/train_demo/LR-1-7/main_program
    wget -q http://paddle-tar.bj.bcebos.com/train_demo/LR-1-7/startup_program
12 13 14 15 16
}

download

# build demo trainer
I
iducn 已提交
17
paddle_install_dir=${PADDLE_ROOT}/build/paddle_install_dir
18 19

mkdir -p build
I
iducn 已提交
20 21 22 23 24
cd build
rm -rf *
cmake .. -DPADDLE_LIB=$paddle_install_dir \
         -DWITH_MKLDNN=$TURN_ON_MKL \
         -DWITH_MKL=$TURN_ON_MKL
25 26 27 28 29 30
make

cd ..

# run demo trainer
build/demo_trainer