Commit 99a7d749 authored by Yuxin Wu's avatar Yuxin Wu

misc small changes and fix #688

parent 196a17f3
......@@ -64,7 +64,7 @@ The two 360k models have identical configurations with
`R50-C4-2x` configuration in
[Detectron Model Zoo](https://github.com/facebookresearch/Detectron/blob/master/MODEL_ZOO.md#end-to-end-faster--mask-r-cnn-baselines).
They get the __same performance__ with the official models, and are about 14% slower than the official implementation,
probably due to the lack of specialized ops in TensorFlow.
probably due to the lack of specialized ops (e.g. AffineChannel, ROIAlign) in TensorFlow.
## Notes
......
......@@ -21,7 +21,7 @@ FREEZE_AFFINE = False # do not train affine parameters inside BN
# schedule -----------------------
BASE_LR = 1e-2
WARMUP = 500 # in steps
WARMUP = 1000 # in steps
STEPS_PER_EPOCH = 500
LR_SCHEDULE = [150000, 230000, 280000]
# LR_SCHEDULE = [120000, 160000, 180000] # "1x" schedule in detectron
......
......@@ -21,7 +21,7 @@ if __name__ == '__main__':
parser.add_argument('--print-timing', action='store_true')
args = parser.parse_args()
tf.train.import_meta_graph(args.meta)
tf.train.import_meta_graph(args.meta, clear_devices=True)
G = tf.get_default_graph()
with tf.Session(config=get_default_sess_config()) as sess:
init = get_model_loader(args.model)
......
......@@ -17,7 +17,7 @@ if __name__ == '__main__':
parser.add_argument(dest='output', help='output model file, can be npz or TF checkpoint')
args = parser.parse_args()
tf.train.import_meta_graph(args.meta)
tf.train.import_meta_graph(args.meta, clear_devices=True)
# loading...
init = get_model_loader(args.input)
......
......@@ -125,8 +125,9 @@ def Dropout(x, *args, **kwargs):
if 'is_training' in kwargs:
kwargs['training'] = kwargs.pop('is_training')
if len(args) > 0:
if args[0] != 0.5:
logger.warn(
"The first positional argument to tensorpack.Dropout is the probability to keep rather than to drop. "
"The first positional argument to tensorpack.Dropout is the probability to keep, rather than to drop. "
"This is different from the rate argument in tf.layers.Dropout due to historical reasons. "
"To mimic tf.layers.Dropout, explicitly use keyword argument 'rate' instead")
rate = 1 - args[0]
......
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