mxnet: how to retrieve the number of example from the DataIter object?

246 Views Asked by At

After using the mx.io.ImageRecordIter() to load my training examples, is there a way to retrieve the total number of examples from the returned DataIter object ?

Many thanks,

1

There are 1 best solutions below

0
On BEST ANSWER

Length of the iterator is unknown until you iterate through it.

You could iterate through and count the number of examples but depending on the data set size, this could be a time consuming operation.