• Zhicheng Yan's avatar
    allow to skip loading model weights in build_model() · f2a0c52c
    Zhicheng Yan authored
    Summary:
    Pull Request resolved: https://github.com/facebookresearch/d2go/pull/630
    
    Currently, in runner **build_model()** method, when **eval_only=True**, we always try to load model weights.
    This is quite restricted in some cases. For example, we may just wanna build a model in eval mode to profile its efficiency, and we have not trained the model or generated the model weights in a checkpoint file.
    
    Thus, this diff adds an argument **skip_model_weights** to allow users to skip the loading of model weights.
    Note, this diff is entirely back-compatible and is NOT expected to break existing implementations.
    
    Reviewed By: navsud, wat3rBro
    
    Differential Revision: D50623772
    
    fbshipit-source-id: 282dc6f19e17a4dd9eb0048e068c5299bb3d47c2
    f2a0c52c
exporter.py 4.91 KB