Incorrect setting of `is_test` in EfficientNet
Created by: sbl1996
is_test
is not correctly set in EfficientNet, leading to drop_connect in test time. It can be easily reproduced by a repeat of inferring in the same image, like what happens in the following.
The predicted probabilities were different between different runs.
The cause may like this.
is_test
defaults to False in EfficientNet
and is not being set to True in either infer.py
or predict.py
.
Moreover, duplicated definition of is_test
in both __init__
and net
leads to confusion.
In fact, _drop_connect
uses self.is_test
and is_test
passed by methods is not used.
It would be better to fix it.