facebookresearch / mmf

A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
https://mmf.sh/
Other
5.49k stars 935 forks source link

[feat] Add loss support for dict return type #1086

Closed Ryan-Qiyu-Jiang closed 3 years ago

Ryan-Qiyu-Jiang commented 3 years ago

Summary: Add loss support for classes that return a dict of losses. All loss dictionaries are flattened in the final losses dict. Added bce_kl, mse_mae loss classes as examples and for unit testing. This new loss class returns a dict, containing the bce and kl div tensors as values with string keys.

facebook-github-bot commented 3 years ago

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot commented 3 years ago

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 3 years ago

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 3 years ago

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot commented 3 years ago

@Ryan-Qiyu-Jiang merged this pull request in facebookresearch/mmf@610c1425ce2d5a4c1e4b244a594af35972c127e7.