Skip to content

Commit

Permalink
Append context and epoch info automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
hm-ysjiang committed Jun 7, 2023
1 parent e10af9b commit cec2a79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions train-selfsupervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def train(args):
args = parser.parse_args()
if args.hidden != 128 or args.context != 128:
args.reset_context = True
args.name = f'{args.name}-ep{args.num_epochs}-c{args.context}'

torch.manual_seed(1234)
np.random.seed(1234)
Expand Down
1 change: 1 addition & 0 deletions train-supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def train(args):
args = parser.parse_args()
if args.hidden != 128 or args.context != 128:
args.reset_context = True
args.name = f'{args.name}-ep{args.num_epochs}-c{args.context}'

torch.manual_seed(1234)
np.random.seed(1234)
Expand Down
8 changes: 4 additions & 4 deletions train.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# From scratch
cmd_supervised_scratch="python -u train-supervised.py \
--name supervised-scratch-c128 \
--name supervised-scratch \
--validation sintel \
--num_epochs 100 \
--batch_size 3 \
Expand All @@ -9,7 +9,7 @@ cmd_supervised_scratch="python -u train-supervised.py \
--context 128"

cmd_selfsupervised_scratch="python -u train-selfsupervised.py \
--name selfsupervised-scratch-c128 \
--name selfsupervised-scratch \
--validation sintel \
--num_epochs 100 \
--batch_size 3 \
Expand All @@ -19,7 +19,7 @@ cmd_selfsupervised_scratch="python -u train-selfsupervised.py \

# Transfer
cmd_supervised_transfer="python -u train-supervised.py \
--name supervised-transfer-c128 \
--name supervised-transfer \
--validation sintel \
--restore_ckpt checkpoints/raft-things.pth \
--num_epochs 100 \
Expand All @@ -32,7 +32,7 @@ cmd_supervised_transfer="python -u train-supervised.py \
--context 128"

cmd_selfsupervised_transfer="python -u train-selfsupervised.py \
--name selfsupervised-transfer-c128 \
--name selfsupervised-transfer \
--validation sintel \
--restore_ckpt checkpoints/raft-things.pth \
--num_epochs 100 \
Expand Down

0 comments on commit cec2a79

Please sign in to comment.