提交 abc62005 编写于 作者: R Reed 提交者: Taylor Robie

Fix crash on single-core systems. (#4957)

上级 e6353fe5
......@@ -327,7 +327,8 @@ def construct_cache(dataset, data_dir, num_data_readers):
data during training.
"""
cache_paths = rconst.Paths(data_dir=data_dir)
num_data_readers = num_data_readers or int(multiprocessing.cpu_count() / 2)
num_data_readers = (num_data_readers or int(multiprocessing.cpu_count() / 2)
or 1)
approx_num_shards = int(movielens.NUM_RATINGS[dataset]
// rconst.APPROX_PTS_PER_TRAIN_SHARD) or 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册