ImageRecordIter usage with autoencoder
So I am trying to create an auto encoder with large image sets and I was wondering how to create/read image records. I created a data record using im2rec as shown in http://myungjun-youn-demo.readthedocs.org/en/latest/python/io.html . But this was using standard class labels. Therefore when I use :
loss = mx.symbol.LinearRegressionOutput(data=data, label=reconstructed_data)
I get the error : mxnet.base.MXNetError: [18:40:21] src/symbol/symbol.cc:121: Symbol.InferShapeKeyword argument name softmax_label not found.
I was using mx.io.ImageRecordIter() in the following manner:
train = mx.io.ImageRecordIter( path_imgrec = os.path.join(args.data_dir, args.train_dataset), data_shape = (3,256,256), batch_size = 128, rand_crop = True, rand_mirror = True, num_parts = kv.num_workers, part_index = kv.rank)
So I am wondering :
1)if ImageRecordIter() can be used for autoencoder purposes where input data and label should be same ? 2) or is my creation mechanism through im2rec not advisable for use with autoencoders ?
ImageRecordIter outputs 'data' and 'softmax_label'. Your model only uses 'data' but not 'softmax_label'. You need to write a DataIter that wraps around ImageRecordIter and ignores the 'softmax_label' and only output 'data'.
This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!