Skip to content

Commit

Permalink
Fix criteria entries for supervised compression in coco2017
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshitomo-matsubara committed Sep 29, 2024
1 parent df56b0a commit 90ad399
Show file tree
Hide file tree
Showing 18 changed files with 983 additions and 892 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ train:
milestones: [5]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
func2extract_org_loss: 'extract_org_loss_dict'
org_term:
weight: 1.0
sub_terms:
key: 'WeightedSumLoss'
func2extract_model_loss: 'extract_model_loss_dict'
kwargs:
model_term:
weight: 1.0

test:
test_data_loader:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ train:
milestones: [5]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
func2extract_org_loss: 'extract_org_loss_dict'
org_term:
weight: 1.0
sub_terms:
key: 'WeightedSumLoss'
func2extract_model_loss: 'extract_model_loss_dict'
kwargs:
model_term:
weight: 1.0

test:
test_data_loader:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ train:
milestones: [5]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
func2extract_org_loss: 'extract_org_loss_dict'
org_term:
weight: 1.0
sub_terms:
key: 'WeightedSumLoss'
func2extract_model_loss: 'extract_model_loss_dict'
kwargs:
model_term:
weight: 1.0

test:
test_data_loader:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ train:
milestones: [5]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
func2extract_org_loss: 'extract_org_loss_dict'
org_term:
weight: 1.0
sub_terms:
key: 'WeightedSumLoss'
func2extract_model_loss: 'extract_model_loss_dict'
kwargs:
model_term:
weight: 1.0

test:
test_data_loader:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ train:
milestones: [5]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
func2extract_org_loss: 'extract_org_loss_dict'
org_term:
weight: 1.0
sub_terms:
key: 'WeightedSumLoss'
func2extract_model_loss: 'extract_model_loss_dict'
kwargs:
model_term:
weight: 1.0

test:
test_data_loader:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,70 +140,77 @@ train:
milestones: [3]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
org_term:
weight: 0.0
sub_terms:
layer1:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.bottleneck_layer'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer1'
io: 'output'
weight: 1.0
layer2:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.layer2'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer2'
io: 'output'
weight: 1.0
layer3:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.layer3'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer3'
io: 'output'
weight: 1.0
layer4:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.layer4'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer4'
io: 'output'
weight: 1.0
key: 'WeightedSumLoss'
kwargs:
sub_terms:
layer1:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
criterion_wrapper:
key: 'SimpleLossWrapper'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.bottleneck_layer'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer1'
io: 'output'
weight: 1.0
layer2:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
criterion_wrapper:
key: 'SimpleLossWrapper'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.layer2'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer2'
io: 'output'
weight: 1.0
layer3:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
criterion_wrapper:
key: 'SimpleLossWrapper'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.layer3'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer3'
io: 'output'
weight: 1.0
layer4:
criterion:
key: 'MSELoss'
kwargs:
reduction: 'sum'
criterion_wrapper:
key: 'SimpleLossWrapper'
kwargs:
input:
is_from_teacher: False
module_path: 'seq.backbone.body.layer4'
io: 'output'
target:
is_from_teacher: True
module_path: 'seq.backbone.body.layer4'
io: 'output'
weight: 1.0
stage2:
num_epochs: 5
train_data_loader:
Expand Down Expand Up @@ -254,11 +261,11 @@ train:
milestones: [3]
gamma: 0.1
criterion:
key: 'GeneralizedCustomLoss'
func2extract_org_loss: 'extract_org_loss_dict'
org_term:
weight: 1.0
sub_terms:
key: 'WeightedSumLoss'
func2extract_model_loss: 'extract_model_loss_dict'
kwargs:
model_term:
weight: 1.0

test:
test_data_loader:
Expand Down
Loading

0 comments on commit 90ad399

Please sign in to comment.