Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

chainer extension argument invoke_before_training=True may not work? #338

Closed
machanic opened this issue Jul 13, 2017 · 3 comments
Closed

Comments

@machanic
Copy link

I use your train.py to train fast_rcnn and modify the evaluate extension and I found the invoke_before_training=True.
I hope to evaluate the model before train and I found it not work as I expected?

@yuyu2172
Copy link
Member

What do you mean it is not working as expected?
Is it running or is it not reporting values as expected?
I think LogReport needs to be initialized before the Evaluator.

@machanic
Copy link
Author

I mean it will not execute evaluate code before training start.

@yuyu2172
Copy link
Member

I found that this option is abolished in Chainer v2.
https://docs.chainer.org/en/stable/upgrade.html#extension-invoke-before-training-is-removed

You can evaluate your model outside of the training loop by

evaluator = DetectionVOCEvaluator(
    test_iter, model.faster_rcnn, use_07_metric=True,
    label_names=voc_detection_label_names)
print(evaluator.evaluate())  # the evaluation with a randomly initialized model.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants