Skip to content

Commit

Permalink
modify config
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhengzhe committed Jul 19, 2021
1 parent d69da71 commit d5f92e1
Show file tree
Hide file tree
Showing 18 changed files with 1,805 additions and 7 deletions.
8 changes: 4 additions & 4 deletions 3d-2d-distillation/config/scannet/scannet_pspnet50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ TRAIN:
zoom_factor: 8 # zoom factor for final prediction during training, be in [1, 2, 4, 8]
ignore_label: 255
aux_weight: 0.4
train_gpu: [0,1,2,3]
workers: 16 # data loader workers
batch_size: 16 # batch size for training
train_gpu: [0]
workers: 2 # data loader workers
batch_size: 2 # batch size for training
batch_size_val: 8 # batch size for validation during training, memory and speed tradeoff
base_lr: 0.01
epochs: 50
Expand All @@ -30,7 +30,7 @@ TRAIN:
manual_seed:
print_freq: 10
save_freq: 1
save_path: exp/ade20k/pspnet50/model
save_path: exp/scannet/pspnet50/model
weight: #initmodel/train_epoch_1init.pth #exp/ade20k/pspnet50/model/train_epoch_100.pth #/media/lzz/f1cc9be0-388f-421d-a473-5b33192a9893/semseg_feature/initmodel/init.pth
resume: #exp/ade20k/pspnet50/model/train_epoch_50.pth
evaluate: False # evaluate on validation set, extra gpu memory needed and small batch_size_val is recommend
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Traceback (most recent call last):
File "tool/train.py", line 487, in <module>
main()
File "tool/train.py", line 84, in main
args = get_parser()
File "tool/train.py", line 34, in get_parser
cfg = config.load_cfg_from_cfg_file(args.config)
File "/media/sdb/lzz/release2/3D-to-2D-Distillation-for-Indoor-Scene-Parsing/3d-2d-distillation/util/config.py", line 63, in load_cfg_from_cfg_file
'{} is not a yaml file'.format(file)
AssertionError: config/scannet/scannet_ade20k.yaml is not a yaml file
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Traceback (most recent call last):
File "tool/test.py", line 282, in <module>
main()
File "tool/test.py", line 70, in main
args, dataset_name = get_parser()
File "tool/test.py", line 27, in get_parser
cfg = config.load_cfg_from_cfg_file(args.config)
File "/media/sdb/lzz/release2/3D-to-2D-Distillation-for-Indoor-Scene-Parsing/3d-2d-distillation/util/config.py", line 63, in load_cfg_from_cfg_file
'{} is not a yaml file'.format(file)
AssertionError: config/scannet/scannet_ade20k.yaml is not a yaml file
487 changes: 487 additions & 0 deletions 3d-2d-distillation/exp/scannet/ade20k/train.py

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions 3d-2d-distillation/exp/scannet/ade20k/train.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
PARTITION=gpu
PYTHON=python

dataset=$1
exp_name=$2
exp_dir=exp/${dataset}/${exp_name}
model_dir=${exp_dir}/model
result_dir=${exp_dir}/result
config=config/${dataset}/${dataset}_${exp_name}.yaml
now=$(date +"%Y%m%d_%H%M%S")

mkdir -p ${model_dir} ${result_dir}
cp tool/train.sh tool/train.py ${config} ${exp_dir}

export PYTHONPATH=./
#sbatch -p $PARTITION --gres=gpu:8 -c16 --job-name=train \
$PYTHON -u tool/train.py \
--config=${config} \
2>&1 | tee ${model_dir}/train-$now.log

#sbatch -p $PARTITION --gres=gpu:1 -c2 --job-name=test \
$PYTHON -u tool/test.py \
--config=${config} \
2>&1 | tee ${result_dir}/test-$now.log
Empty file.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Empty file.

Large diffs are not rendered by default.

Empty file.
6 changes: 3 additions & 3 deletions 3d-2d-distillation/exp/scannet/pspnet50/scannet_pspnet50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ TRAIN:
zoom_factor: 8 # zoom factor for final prediction during training, be in [1, 2, 4, 8]
ignore_label: 255
aux_weight: 0.4
train_gpu: [0,1,2,3]
workers: 16 # data loader workers
batch_size: 16 # batch size for training
train_gpu: [0]
workers: 2 # data loader workers
batch_size: 2 # batch size for training
batch_size_val: 8 # batch size for validation during training, memory and speed tradeoff
base_lr: 0.01
epochs: 50
Expand Down

0 comments on commit d5f92e1

Please sign in to comment.