-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@@ -80,6 +80,9 @@ class PrefetcherIter : public IIterator<DataBatch> { | |||
batch.data[i].FlatTo2D<cpu, real_t>()); | |||
(*dptr)->num_batch_padd = batch.num_batch_padd; | |||
} | |||
for (size_t i = 0; i < batch.batch_size; ++i) { | |||
(*dptr)->index[i] = batch.inst_index[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use std::copy
Sorry It is #468 I referred to |
Sorry for holding this back... I will implement a simple peak method hopefully today or tomorrow and get that pr merged. Meanwhile: could you explain a little bit more on The use case of this interface? I'm thinking maybe similar information could be simply obtained by chaining the data iter with the python enumerate function. Also other data iter needs to be modified to add the same interface. |
I think what was wanted is because each image have a unique index, so we can use it to remap labels. Say we store the imid -> bounding box in an independent map on python, and want to attach that information to the iter, while still being able to use the preproc pipeline |
I see. Thanks! |
不好意思,昨天周日没上git,我会尽快重新提交的 |
@tqchen |
hmm, I think you are right, that is easier. https://github.com/dmlc/mxnet/blob/master/python/mxnet/base.py#L131 This function should also be modified to do what was needed. But do need to copy here as well instead of sharing. |
@tqchen 在MXDataGetIndex里面 DataBatch为const的,所以返回*out_index = db.index.data()是需要const_cast,介意不?我一直觉得强制转换不优雅 |
Conflicts: include/mxnet/c_api.h python/mxnet/io.py python/mxnet/model.py src/c_api/c_api.cc src/io/iter_prefetcher.h
@tqchen 请问r_test 通不过,是要注意些什么吗?R的环境细节我不熟悉。。。 |
@junranhe Because you delete the |
add swapaxis operator into mxnet
@thirdwing 好,改了,同时想问下可不可以吧 MXNET_CUDNN_PATH这个参数放回来?实际开发环境有多套cudnn,指定路径比较方便:) |
@tqchen 这个pr还有需要吗?要不撤了,有需要我在重新pr,rebase得比较danteng,还有checkfail 在 一个cpp_test里面,感觉跟io没什么关系啊?我比较忙没时间深究。。。 |
Sorry about the delayed reply, this is merged |
在mxioiter添加了每个batch中添加了index,用于在python中查找其他辅助信息