reset50 gpu change to defaut training to mixprecision

This commit is contained in:
VectorSL 2020-08-20 20:00:02 +08:00
parent 78f4923e83
commit 13de53d667
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ then
fi fi
if [ ! -d $PATH2 ] if [ ! -d $PATH1 ]
then then
echo "error: DATASET_PATH=$PATH1 is not a directory" echo "error: DATASET_PATH=$PATH1 is not a directory"
exit 1 exit 1

View File

@ -163,7 +163,7 @@ if __name__ == '__main__':
loss = SoftmaxCrossEntropyWithLogits(sparse=True, reduction="mean", is_grad=False, loss = SoftmaxCrossEntropyWithLogits(sparse=True, reduction="mean", is_grad=False,
num_classes=config.class_num) num_classes=config.class_num)
if args_opt.net == "resnet101": if args_opt.net == "resnet101" or args_opt.net == "resnet50":
opt = Momentum(filter(lambda x: x.requires_grad, net.get_parameters()), lr, config.momentum, config.weight_decay, opt = Momentum(filter(lambda x: x.requires_grad, net.get_parameters()), lr, config.momentum, config.weight_decay,
config.loss_scale) config.loss_scale)
loss_scale = FixedLossScaleManager(config.loss_scale, drop_overflow_update=False) loss_scale = FixedLossScaleManager(config.loss_scale, drop_overflow_update=False)