Skip to content

Commit 1adc09b

Browse files
authored
Make Batch Size Smaller on Mac Because of CI Machine (#28569)
I found the unittest failed due to batch size. Maybe the reason is that our CI machine has limited memory. I decreased the batch size.
1 parent ed9dd7c commit 1adc09b

File tree

1 file changed

+4
-1
lines changed
  • python/paddle/fluid/tests/unittests/dygraph_to_static

1 file changed

+4
-1
lines changed

python/paddle/fluid/tests/unittests/dygraph_to_static/yolov3.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
from __future__ import division
1616
from __future__ import print_function
1717

18+
import os
19+
import sys
20+
1821
import paddle.fluid as fluid
1922
from paddle.fluid.dygraph import declarative
2023
from paddle.fluid.dygraph.base import to_variable
@@ -90,7 +93,7 @@ def __setattr__(self, name, value):
9093
# SOLVER options
9194
#
9295
# batch size
93-
cfg.batch_size = 4
96+
cfg.batch_size = 2 if sys.platform == 'darwin' or os.name == 'nt' else 4
9497
# derived learning rate the to get the final learning rate.
9598
cfg.learning_rate = 0.001
9699
# maximum number of iterations

0 commit comments

Comments
 (0)