"vscode:/vscode.git/clone" did not exist on "39a3c77e0d4a22de189b02398cf2d003d299b4ae"
set cache in recorded layers
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/433 Distillation uses a module called `CachedLayer` to record the outputs of a layer to an internal dict. This dict is typically initialized by the object itself and any value is overwritten every time the model runs. However, sometimes we need more than one output run of the layer (e.g., domain adaptation => we run the model on real, then synthetic data and need to use both outputs). This diff adds a helper to set externally set the cache dict of a model. In other words, we can run `set_cache_dict` on some model to change the dict used by all `CachedLayer` in the model. This allows us to run the model and record some outputs, then change the cache dict and rerun the model to save different outputs. Differential Revision: D40970577 fbshipit-source-id: 49cb851af49ae193d0c8ac9218e02fdaf4e6587b
Showing
Please register or sign in to comment