nntrainer icon indicating copy to clipboard operation
nntrainer copied to clipboard

Support tensor iterator

Open kparichay opened this issue 3 years ago • 3 comments

Tensor does not support an iterator. It is basic to iterate over a tensor if its memory of contiguous, but with strided access, a proper lightweight operator is needed.

kparichay avatar Oct 23 '21 13:10 kparichay

:octocat: cibot: Thank you for posting issue #1668. The person in charge will reply soon.

taos-ci avatar Oct 23 '21 13:10 taos-ci

reference: https://numpy.org/doc/stable/reference/arrays.nditer.html

Somewhat(?) related issue #704

zhoonit avatar Oct 25 '21 03:10 zhoonit

Yeah, that's a good related interface. A similar interface is needed but has to be lightweight. I was thinking more closer c++ iterators where next() in the iterator should handle the stride internally.

kparichay avatar Oct 25 '21 11:10 kparichay