NVIDIA/DALI

numpy reader error

Open

#3,714 创建于 2022年3月2日

在 GitHub 查看
 (1 评论) (0 反应) (1 负责人)C++ (670 fork)auto 404
help wanted

仓库指标

Star
 (5,722 star)
PR 合并指标
 (PR 指标待抓取)

描述

The following error occurred while loading data to gpu using numpy reader.

Below is the source code and the printed error message.

from nvidia.dali import pipeline_def, fn data_dir = os.path.join(data_dir_2d, 'SER00001') @pipeline_def(batch_size=batch_size, num_threads=1, device_id=0) def pipe_gds(): data = fn.readers.numpy(device='gpu', file_root=data_dir, file_filter='*.npy') return data p = pipe_gds()
p.build() pipe_out = p.run()
data_gds = pipe_out[0].as_cpu().as_array() # as_cpu() to c|opy the data back to CPU memory print(data_gds.shape)

RuntimeError: [/opt/dali/dali/python/backend_impl.cc:752] Assert on "tl.IsDenseTensor()" failed: Tensors in the list must have the same shape

贡献者指南