update train.py

This commit is contained in:
WenmuZhou
2022-08-10 11:04:06 +00:00
parent 70145c3cdb
commit 4ac17fca55
-2
View File
@@ -123,8 +123,6 @@ def main(config, device, logger, vdl_writer):
if use_sync_bn:
model = paddle.nn.SyncBatchNorm.convert_sync_batchnorm(model)
logger.info('convert_sync_batchnorm')
if config['Global']['distributed']:
model = paddle.DataParallel(model)
model = apply_to_static(model, config, logger)