提交 efa7d303 编写于 作者: X xiongkun 提交者: Wei Shengyu

make loss deterministic while running on gpu

上级 4924749e
......@@ -8,7 +8,7 @@ BASEDIR=$(dirname "$0")
FILENAME=$1
sed -i 's/gpu_list.*$/gpu_list:0/g' $FILENAME
sed -i '23,$d' $FILENAME
sed -i 's/-o Global.device:.*$/-o Global.device:cpu/g' $FILENAME
#sed -i 's/-o Global.device:.*$/-o Global.device:cpu/g' $FILENAME
sed -i '16s/$/ -o Global.print_batch_step=1/' ${FILENAME}
......@@ -22,6 +22,9 @@ rm -rf $LOG_PATH
mkdir -p ${LOG_PATH}
status_log="${LOG_PATH}/results_python.log"
# make cudnn algorithm deterministic, such as conv.
export FLAGS_cudnn_deterministic=True
# start dygraph train
dygraph_output=$LOG_PATH/python_train_infer_dygraph_output.txt
dygraph_loss=$LOG_PATH/dygraph_loss.txt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册