DeepLab V3+:ResourceExhaustedError (see above for traceback): OOM when allocating tensor of shape
在跑DeepLab V3+時遇到ResourceExhaustedError (see above for traceback): OOM when allocating tensor of shape錯誤
GPU:1060/6G
github:https://github.com/tensorflow/models/tree/master/research/deeplab
是視訊記憶體不夠了,把local_test.sh檔案中
python "${WORK_DIR}"/train.py \
--logtostderr \
--train_split="trainval" \
--model_variant="xception_65" \
--atrous_rates=6 \
--atrous_rates=12 \
--atrous_rates=18 \
--output_stride=16 \
--decoder_output_stride=4 \
--train_crop_size=513 \
--train_crop_size=513 \
--train_batch_size=4 \
--training_number_of_steps="${NUM_ITERATIONS}" \
--fine_tune_batch_norm=true \ <==============改這行
--tf_initial_checkpoint="${INIT_FOLDER}/deeplabv3_pascal_train_aug/model.ckpt" \
--train_logdir="${TRAIN_LOGDIR}" \
--dataset_dir="${PASCAL_DATASET}"
改為
python "${WORK_DIR}"/train.py \
--logtostderr \
--train_split="trainval" \
--model_variant="xception_65" \
--atrous_rates=6 \
--atrous_rates=12 \
--atrous_rates=18 \
--output_stride=16 \
--decoder_output_stride=4 \
--train_crop_size=513 \
--train_crop_size=513 \
--train_batch_size=1 \
--training_number_of_steps="${NUM_ITERATIONS}" \
--fine_tune_batch_norm=false \
--tf_initial_checkpoint="${INIT_FOLDER}/deeplabv3_pascal_train_aug/model.ckpt" \
--train_logdir="${TRAIN_LOGDIR}" \
--dataset_dir="${PASCAL_DATASET}"
之後正常訓練