Batch为32时报错,其他数字不报错

用的是python,cpu跑的代码,用hanlp.pipeline()进行分析,输入batch为32时报错,其他数字不报错

下面是报出的错误信息:
UnknownError: AssertionError: unable to assign 22 datapoints to 32 clusters
Traceback (most recent call last):

File “D:\Anaconda3\envs\pytorch\lib\site-packages\tensorflow_core\python\ops\script_ops.py”, line 236, in call
ret = func(*args)

File “D:\Anaconda3\envs\pytorch\lib\site-packages\tensorflow_core\python\data\ops\dataset_ops.py”, line 789, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))

File “D:\Anaconda3\envs\pytorch\lib\site-packages\hanlp\components\parsers\conll.py”, line 239, in generator
buckets = dict(zip(*kmeans(lengths, n_buckets)))

File “D:\Anaconda3\envs\pytorch\lib\site-packages\hanlp\components\parsers\alg.py”, line 52, in kmeans
assert len(d) >= k, f"unable to assign {len(d)} datapoints to {k} clusters"

AssertionError: unable to assign 22 datapoints to 32 clusters

 [[{{node PyFunc}}]]