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

As the title
revert-31562-mean
Huihuang Zheng 4 years ago committed by GitHub
parent 8e3a294045
commit cd5f11b822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,10 +1,6 @@
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

Loading…
Cancel
Save