NAN test set accuracy was

When calibration model, the model evaluation test set accuracy was NaN3, as
NaN3
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numpy/core/fromnumeric.py:3118: RuntimeWarning:. Slice on Mean of empty
OUT = OUT, ** kwargs)
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numpy/core/_methods.py:85: RuntimeWarning: value encountered in double_scalars invalid
RET = ret.dtype.type (RET / RCOUNT)
investigation, the amount of the original test data set is too small, while we set the batch_size, provided the value is greater than the number of data test set.
Solution, the drop_last replaced by the True False

eval_reader = paddle.batch(custom_reader(eval_list_path),
                            batch_size=batch_size,
                            drop_last=False)
Released nine original articles · won praise 8 · views 771

Guess you like

Origin blog.csdn.net/weixin_42076509/article/details/105320854