[已解决]DataLoader可以加载str类型吗?

以下的讨论是基于:
MXNet版本: --pre
操作系统: Ubuntu16.04
我在预测的时候想用batch的方式预测,是那种没有标签的那种纯预测.
这个时候我想让Dataset返回image和file_name,其中file_name文件名,也就是一个str.这个Dataset是可以跑通的.
但是用Dataloader的时候报错了

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 392, in _worker_fn
    batch = batchify_fn([_worker_dataset[i] for i in samples])
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 146, in default_mp_batchify_fn
    return [default_mp_batchify_fn(i) for i in data]
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 146, in <listcomp>
    return [default_mp_batchify_fn(i) for i in data]
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 150, in default_mp_batchify_fn
    ctx=context.Context('cpu_shared', 0))
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/ndarray/utils.py", line 146, in array
    return _array(source_array, ctx=ctx, dtype=dtype)
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/ndarray/ndarray.py", line 2488, in array
    arr = empty(source_array.shape, ctx, dtype)
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/ndarray/ndarray.py", line 3877, in empty
    return NDArray(handle=_new_alloc_handle(shape, ctx, False, dtype))
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/ndarray/ndarray.py", line 139, in _new_alloc_handle
    ctypes.c_int(int(_DTYPE_NP_TO_MX[np.dtype(dtype).type])),
KeyError: <class 'numpy.str_'>
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/piston/PycharmProjects/match/lib/utils.py", line 147, in <module>
    for b in val_data:
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 435, in __next__
    batch = pickle.loads(ret.get())
  File "/home/piston/miniconda3/envs/mxnet-90/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
KeyError: <class 'numpy.str_'>

请问有什么方法解决吗?或许有什么方法能达成我的目的?

我想到一个办法,直接把dataset的item返回回来,对应的时候用dataset.file_name[item]去对应.