Skip to content

Commit

Permalink
Update README and target epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
hm-ysjiang committed Jun 4, 2023
1 parent 3fb73f7 commit 621b99a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Zachary Teed and Jia Deng<br/>
- [ ] Train supervised to 200 (See if scratch is good enough)
- [ ] Train self-supervised to 200 (Using scratch / transfer)
- [ ] Run experiments of ctx size = { 96, 64 }
- [ ] SSIM error on supervised setting
- [ ] Add self-collected dataset experiments
- [ ] Try-out context attention module ([GMFlowNet](https://github.com/xiaofeng94/GMFlowNet))

Expand Down
5 changes: 3 additions & 2 deletions train-selfsupervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ def sequence_loss(flow_preds: List[torch.Tensor], flow_gt: torch.Tensor,

for i in range(n_predictions):
i_weight = gamma**(n_predictions - i - 1)
l1_err, ssim_err = photometric_error(
image1, image2, flow_preds[i], valid[:, None])
l1_err, ssim_err = photometric_error(image1, image2,
flow_preds[i],
valid[:, None])
i_loss = (1 - SSIM_WEIGHT) * l1_err + SSIM_WEIGHT * ssim_err
flow_loss += i_weight * i_loss

Expand Down
4 changes: 2 additions & 2 deletions train-selfsupervised.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mkdir -p checkpoints
cmd_scratch="python -u train-selfsupervised.py \
--name raft-sintel-selfsupervised-scratch \
--validation sintel \
--num_epochs 100 \
--num_epochs 200 \
--batch_size 6 \
--lr 0.0004 \
--wdecay 0.00001"
Expand All @@ -14,7 +14,7 @@ cmd_transfer="python -u train-selfsupervised.py \
--validation sintel \
--restore_ckpt checkpoints/raft-things.pth \
--freeze_bn \
--num_epochs 100 \
--num_epochs 200 \
--batch_size 6 \
--lr 0.000125 \
--wdecay 0.00001 \
Expand Down
12 changes: 6 additions & 6 deletions train-supervised.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mkdir -p checkpoints
cmd_scratch="python -u train-supervised.py \
--name raft-sintel-supervised-scratch \
--validation sintel \
--num_epochs 100 \
--num_epochs 200 \
--batch_size 6 \
--lr 0.0004 \
--wdecay 0.00001"
Expand All @@ -14,14 +14,14 @@ cmd_transfer="python -u train-supervised.py \
--validation sintel \
--restore_ckpt checkpoints/raft-things.pth \
--freeze_bn \
--num_epochs 100 \
--num_epochs 200 \
--batch_size 6 \
--lr 0.000125 \
--wdecay 0.00001 \
--gamma=0.85"

# echo ${cmd_scratch}
# eval ${cmd_scratch}
echo ${cmd_scratch}
eval ${cmd_scratch}

echo ${cmd_transfer}
eval ${cmd_transfer}
# echo ${cmd_transfer}
# eval ${cmd_transfer}

0 comments on commit 621b99a

Please sign in to comment.