未验证 提交 cd5f11b8 编写于 作者: H Huihuang Zheng 提交者: GitHub

Decrease Batch Size for Windows CI, test=develop (#30331)

As the title
上级 8e3a2940
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(WIN32)
LIST(REMOVE_ITEM TEST_OPS test_tsm)
endif()
foreach(TEST_OP ${TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach(TEST_OP)
......
......@@ -214,7 +214,8 @@ class FakeDataReader(object):
self.img_std = np.array(cfg.MODEL.image_std).reshape(
[3, 1, 1]).astype(np.float32)
self.batch_size = cfg[mode.upper()]['batch_size']
self.batch_size = 1 if sys.platform == 'darwin' or os.name == 'nt' else cfg[
mode.upper()]['batch_size']
self.generator_out = []
self.total_iter = 3
for i in range(self.total_iter):
......@@ -240,7 +241,8 @@ class FakeDataReader(object):
def create_optimizer(cfg, params):
total_videos = cfg.total_videos
step = int(total_videos / cfg.batch_size + 1)
batch_size = 1 if sys.platform == 'darwin' or os.name == 'nt' else cfg.batch_size
step = int(total_videos / batch_size + 1)
bd = [e * step for e in cfg.decay_epochs]
base_lr = cfg.learning_rate
lr_decay = cfg.learning_rate_decay
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册