simon-ging / coot-videotext

COOT: Cooperative Hierarchical Transformer for Video-Text Representation Learning
Apache License 2.0
288 stars 55 forks source link

[BUG] CMC loss in the master #12

Closed lzlzlizi closed 3 years ago

lzlzlizi commented 3 years ago

Describe the bug Hi, it seems in trainer, the CMC loss is not working.

# loss += self.compute_cmc_loss(
#     clip_emb_reshape, clip_emb_mask, clip_emb_lens,
#     sent_emb_reshape, sent_emb_mask, sent_emb_lens)
simon-ging commented 3 years ago

Hi,

it's turned off during validation for performance reasons. During training it's active.

If you want to make sure it's working, you could change one of the configurations and set loss_cycle_cons: 0 near the top of the file, then check how the performance changes.

lzlzlizi commented 3 years ago

Oh, that's right. I didn't notice it's in the eval part. Thanks!

simon-ging commented 3 years ago

Since the latest update CMC will work correctly both on training and validation.