add class to keep track of loss metadata and function to compute losses
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/419 This diff adds a metadata class `LayerLossMetadata` to help keep track of the losses we want to compute over layers. The class contains the type of loss, loss name, and layer names. This diff adds a helper function to iterate over a list of `LayerLossMetadata` and return a dict containing the results. Reviewed By: chihyaoma Differential Revision: D40286564 fbshipit-source-id: b269dc63cc90a437ca279379d759c3106016327c
Showing
Please register or sign in to comment