mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

Can it use .rec file to test the model(.params) file accuracy? ?

Open pinglforever opened this issue 10 years ago • 2 comments

I have trained out the model file(.params and .json) by train and val dataset. Now I can use test dataset to generate the .rec file using im2rec tool, can I use such files(.rec and .params etc.) to test the trained model accuracy directly? Thanks!

pinglforever avatar Aug 11 '16 05:08 pinglforever

yes, you can.
just as trainning, create model = mx.model.FeedForward(...) first, then prepare your test.rec, at last use it like this:
logging.info("top-1 and top-5 acc is {}".format(model.score(X = test, eval_metric = ['acc', mx.metric.create('top_k_accuracy', top_k = 5)])))

tornadomeet avatar Aug 11 '16 05:08 tornadomeet

Thanks a lot, solve my problem perfectly!

pinglforever avatar Aug 11 '16 11:08 pinglforever