Skip to content

Commit 92d2d33

Browse files
authored
Fix training error caused by float type of default_batch_size parameter (#2662)
1 parent 6fb441f commit 92d2d33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

webui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def set_default():
116116
gpu_info = "\n".join(gpu_infos)
117117
if is_gpu_ok:
118118
minmem = min(mem)
119-
default_batch_size = minmem // 2 if version not in v3v4set else minmem // 8
120-
default_batch_size_s1 = minmem // 2
119+
default_batch_size = int(minmem // 2 if version not in v3v4set else minmem // 8)
120+
default_batch_size_s1 = int(minmem // 2)
121121
else:
122122
default_batch_size = default_batch_size_s1 = int(psutil.virtual_memory().total / 1024 / 1024 / 1024 / 4)
123123
if version not in v3v4set:

0 commit comments

Comments
 (0)