diff --git a/cuda_train.cmd b/cuda_train.cmd index 2270905..7d471d5 100644 --- a/cuda_train.cmd +++ b/cuda_train.cmd @@ -1 +1 @@ -python train.py --load_model --batch_size 8 --learning_rate 0.0003 --enable_onnx \ No newline at end of file +python train.py --load_model --batch_size 4 --learning_rate 0.0003 --enable_onnx \ No newline at end of file diff --git a/douzero/dmc/arguments.py b/douzero/dmc/arguments.py index 496fe4c..68244c3 100644 --- a/douzero/dmc/arguments.py +++ b/douzero/dmc/arguments.py @@ -11,8 +11,8 @@ parser.add_argument('--objective', default='adp', type=str, choices=['adp', 'wp' help='Use ADP or WP as reward (default: ADP)') # Training settings -parser.add_argument('--onnx_sync_interval', default=5, type=int, - help='Time interval (in minutes) at which to sync the onnx model') +parser.add_argument('--onnx_sync_interval', default=30, type=int, + help='Time interval (in seconds) at which to sync the onnx model') parser.add_argument('--actor_device_cpu', action='store_true', help='Use CPU as actor device') parser.add_argument('--gpu_devices', default='0', type=str, diff --git a/douzero/dmc/dmc.py b/douzero/dmc/dmc.py index 53ff12e..242aecf 100644 --- a/douzero/dmc/dmc.py +++ b/douzero/dmc/dmc.py @@ -254,7 +254,7 @@ def train(flags): checkpoint(frames) last_checkpoint_time = timer() - if timer() - last_onnx_sync_time > flags.onnx_sync_interval * 60: + if timer() - last_onnx_sync_time > flags.onnx_sync_interval: sync_onnx_model(frames) last_onnx_sync_time = timer()