mxnet
mxnet copied to clipboard
Can it use .rec file to test the model(.params) file accuracy? ?
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!
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)])))
Thanks a lot, solve my problem perfectly!