diff --git a/demo/distillation/distill.py b/demo/distillation/distill.py index a180c3c9449531e4372503d01ef022ec6fccdd5b..d7417470da461968f3c5c950ad457ca6bf13af3b 100644 --- a/demo/distillation/distill.py +++ b/demo/distillation/distill.py @@ -123,15 +123,15 @@ def compress(args): batch_size=args.batch_size, return_list=False, shuffle=True, - use_shared_memory=False, - num_workers=1) + use_shared_memory=True, + num_workers=4) valid_loader = paddle.io.DataLoader( val_dataset, places=place, feed_list=[image, label], drop_last=False, return_list=False, - use_shared_memory=False, + use_shared_memory=True, batch_size=args.batch_size, shuffle=False) # model definition diff --git a/demo/quant/pact_quant_aware/train.py b/demo/quant/pact_quant_aware/train.py index 9be4d6f873255fa0957963e25f027dd208cff3d4..d6210a2eb71f2b94dc19f4380be896229a0fa828 100644 --- a/demo/quant/pact_quant_aware/train.py +++ b/demo/quant/pact_quant_aware/train.py @@ -159,9 +159,9 @@ def compress(args): drop_last=True, return_list=False, batch_size=args.batch_size, - use_shared_memory=False, + use_shared_memory=True, shuffle=True, - num_workers=1) + num_workers=4) valid_loader = paddle.io.DataLoader( val_dataset, @@ -170,7 +170,7 @@ def compress(args): drop_last=False, return_list=False, batch_size=args.batch_size, - use_shared_memory=False, + use_shared_memory=True, shuffle=False) if args.analysis: diff --git a/demo/quant/quant_aware/train.py b/demo/quant/quant_aware/train.py index a1c0ea20d9c50ca7baa8b78cc28c46677ca38a2d..af43aeff765645b22a63a59854b1fc34420680b2 100644 --- a/demo/quant/quant_aware/train.py +++ b/demo/quant/quant_aware/train.py @@ -169,9 +169,9 @@ def compress(args): drop_last=True, batch_size=args.batch_size, return_list=False, - use_shared_memory=False, + use_shared_memory=True, shuffle=True, - num_workers=1) + num_workers=4) valid_loader = paddle.io.DataLoader( val_dataset, places=place, @@ -179,7 +179,7 @@ def compress(args): drop_last=False, return_list=False, batch_size=args.batch_size, - use_shared_memory=False, + use_shared_memory=True, shuffle=False) def test(epoch, program):