• Matthew Yu's avatar
    add a helper to record layers in a model · 53c4c2c1
    Matthew Yu authored
    Summary:
    Pull Request resolved: https://github.com/facebookresearch/d2go/pull/418
    
    This diff adds a function that can be used to add `CachedLayers` to a model. Function iterates over named modules and dynamically mixes in `CachedLayer` to target modules.
    
    This diff adds a function to remove the cached layers.
    
    Reviewed By: Minione
    
    Differential Revision: D40285806
    
    fbshipit-source-id: 3137d19927d8fb9ec924a77c9085aea29fe94d5e
    53c4c2c1
test_modeling_distillation.py 18 KB