File size: 2,490 Bytes
f06f310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# /usr/bin/bash


# 获取当前 shell 文件名(不包含路径和扩展名)
SCRIPT_NAME=$(basename "$0" .sh)

# 获取当前时间
CURRENT_TIME=$(date +"%Y%m%d_%H%M%S")

# 如果有参数,使用参数作为文件夹名,否则使用脚本名加时间
if [ -n "$1" ]; then
    FOLDER_NAME="${1}_${CURRENT_TIME}"
    EXP_NAME="${1}"
else
    FOLDER_NAME="${SCRIPT_NAME}_${CURRENT_TIME}"
    EXP_NAME="${SCRIPT_NAME}"
fi


# export NCCL_DEBUG=WARN
export NCCL_P2P_DISABLE=1
# export NCCL_SOCKET_IFNAME=eth0  # 设置正确的网络接口
# export MASTER_ADDR=127.0.0.1
# export MASTER_PORT=29501
# export CUDA_VISIBLE_DEVICES=0,1,2,3
export CUDA_VISIBLE_DEVICES=4,5,6,7

# export DATASET_ROOT="/data6/sceneflow/sceneflow"

export LOG_ROOT="/data5/yao/runs/log/${FOLDER_NAME}"
export TB_ROOT="/data5/yao/runs/tboard/${FOLDER_NAME}"
export CKPOINT_ROOT="/data5/yao/runs/ckpoint/${FOLDER_NAME}"

# 输出新的路径,确认设置正确
echo "LOG_ROOT is set to: $LOG_ROOT"
echo "TB_ROOT is set to: $TB_ROOT"
echo "CKPOINT_ROOT is set to: $CKPOINT_ROOT"



# torchrun --nnode 1 --nproc_per_node 4 --master_port 29301 train_stereo_raftstereo.py --batch_size 8 --train_iters 22 --valid_iters 32 --spatial_scale -0.2 0.4 --saturation_range 0 1.4 --n_downsample 2 --num_steps 100000 --mixed_precision --model_name "RAFTStereoDepthBetaRefine" --depthany_model_dir "/data5/yao/pretrained" --lbp_neighbor_offsets "(-5,-5), (5,5), (5,-5), (-5,5), (-3,0), (3,0), (0,-3), (0,3)" --modulation_ratio 1.0 --conf_from_fea --restore_ckpt "/data5/yao/runs/ckpoint/RaftStereoDepthBetaK53DispRefineSigmoidPreMonoBatch48ConfDim_20241102_014050/50000_RaftStereoDepthBetaK53DispRefineSigmoidPreMonoBatch48ConfDim.pth" --lr 0.0001 --finetune --train_datasets "crestereo" --exp_name "$EXP_NAME"

torchrun --nnode 1 --nproc_per_node 4 --master_port 29301 train_stereo_raftstereo.py --batch_size 8 --train_iters 22 --valid_iters 32 --spatial_scale -0.2 0.4 --saturation_range 0 1.4 --n_downsample 2 --num_steps 100000 --mixed_precision --model_name "RAFTStereoDepthBetaRefine" --depthany_model_dir "/data5/yao/pretrained" --lbp_neighbor_offsets "(-5,-5), (5,5), (5,-5), (-5,5), (-3,0), (3,0), (0,-3), (0,3)" --modulation_ratio 1.0 --conf_from_fea --restore_ckpt "/data5/yao/runs/ckpoint/RaftStereoDepthBetaK53DispRefineSigmoidPreMonoBatch48ConfDim_20241102_014050/50000_RaftStereoDepthBetaK53DispRefineSigmoidPreMonoBatch48ConfDim.pth" --lr 0.0001 --finetune --train_datasets "nerfstereo" --exp_name "$EXP_NAME"