Commit 610d2d03 authored by Abduallah Mohamed's avatar Abduallah Mohamed Committed by Facebook GitHub Bot
Browse files

Clarifying the use of do_test function

Summary: The `do_test` method might be used to perform testing outside the training process. One might think it will load the weights of the models before testing similar to `do_train` method. This diff adds a comment that clarifies this confusion.

Reviewed By: ppwwyyxx

Differential Revision: D29082338

fbshipit-source-id: 6ec7d7f7f243503414fa904f4eb8856e62e9ed6d
parent 30d5ca55
...@@ -386,6 +386,10 @@ class Detectron2GoRunner(BaseRunner): ...@@ -386,6 +386,10 @@ class Detectron2GoRunner(BaseRunner):
return results return results
def do_test(self, cfg, model, train_iter=None): def do_test(self, cfg, model, train_iter=None):
""" do_test does not load the weights of the model.
If you want to use it outside the regular training routine,
you will have to load the weights through a checkpointer.
"""
results = OrderedDict() results = OrderedDict()
with maybe_subsample_n_images(cfg) as new_cfg: with maybe_subsample_n_images(cfg) as new_cfg:
# default model # default model
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment