wayen820 / gender_age_estimation_mxnet

This is a mxnet version implementation of SSR-Net for age and gender Estimation
111 stars 42 forks source link

The last batch is nerver used #18

Open hegc opened 5 years ago

hegc commented 5 years ago

The last batch is nerver used when the total number of examples is not divisible by the batch_size.

try:
    ...
except StopIteration:
    if i<batch_size:
        raise StopIteration
return io.DataBatch([batch_data], [age_label], batch_size - i)

The dataBatch.pad (eg. batch_size-i ) is always 0. So, how to use the last batch when the total number of examples read is not divisible by the batch_size?