Multi-index evaluation model ability for MXNET classification model Training (ACCURACY,CROSS-ENTROPY,TOP_K_ACCURACY)

Source: Internet
Author: User
Tags mxnet

Multi-index evaluation model ability for MXNET classification model Training (accuracy,cross-entropy,top_k_accuracy)
The code is as follows

    Metric=[mx.metric.create (' acc '),
        mx.metric.create (' top_k_accuracy ', top_k=3), mx.metric.create (' CE ')]
    Mod.fit (Train, Val,
        Num_epoch=num_epoch,
        arg_params=arg_params,
        aux_params=aux_params,
        allow_ Missing=true,
        batch_end_callback = Mx.callback.Speedometer (batch_size),
        epoch_end_callback= Checkpoint,
        kvstore= ' device ',
        optimizer= ' sgd ',
        optimizer_params={' learning_rate ': 0.00001, ' Momentum ": 0.9},
        initializer=mx.init.xavier (rnd_type= ' Gaussian ', factor_type=" in ", magnitude=2),
        Eval_ Metric=metric)

The results are as follows:

2017-09-06 16:46:25,648 epoch[0] Batch [$] speed:39.24 samples/sec accuracy=0.929890 t     op_k_accuracy_3=0.983782 cross-entropy=0.264878 2017-09-06 16:49:49,687 epoch[0] Batch [1000] speed:39.21 samples/sec   accuracy=0.949125 top_k_accuracy_3=0.987875 cross-entropy=0.215848 2017-09-06 16:53:13,980 Epoch[0] Batch [1500] speed:39.16 samples/sec accuracy=0.960625 top_k_accuracy_3=0.991625 cross-entropy=0.179014 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.