Skip to content

Commit

Permalink
fix test_fsp_loss ut (PaddlePaddle#668)
Browse files Browse the repository at this point in the history
Co-authored-by: ceci3 <[email protected]>
  • Loading branch information
baiyfbupt and ceci3 authored Feb 23, 2021
1 parent fe145d7 commit c701d2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_fsp_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ def test_fsp_loss(self):
data_name_map = {'image': 'image'}
merge(teacher_main,
paddle.static.default_main_program(), data_name_map, place)

merged_ops = []
for block in paddle.static.default_main_program().blocks:
for op in block.ops:
merged_ops.append(op.type)
distill_loss = fsp_loss(
'teacher_conv5_bn_output.tmp_2', 'teacher_conv6_bn_output.tmp_2',
'conv1_bn_output.tmp_2', 'conv2_bn_output.tmp_2')
distill_loss = fsp_loss('teacher_conv1_out.tmp_1',
'teacher_conv6_out.tmp_0', 'conv1_out.tmp_0',
'conv2_out.tmp_0')
loss_ops = []
for block in paddle.static.default_main_program().blocks:
for op in block.ops:
Expand Down

0 comments on commit c701d2b

Please sign in to comment.