I would like to get all the labels from this object
test = mx.io.ImageRecordIter( path_imgrec = "chestxray/test.rec", data_shape = (3, HEIGHT, WIDTH), path_imglist = "chestxray/test.lst", label_width = 15, batch_size = BATCHSIZE, shuffle = False, rand_mirror = 0, #flip horizontally preprocess_threads = 24 )
for test_batch in test: print(type(test_batch)) d, l = test_batch.data, test_batch.label la = l.asnumpy() print(la.shape)
However, I don’t get the final batch correctly.
Is there a function that loads all the labels directly to memory?