"MXNet" Eighth bomb _ object detection of SSD

Source: Internet
Author: User
Tags mxnet

Pre-and API introduction Mxnet.metric
From mxnet Import metriccls_metric = metric. Accuracy () Box_metric = metric. MAE () cls_metric.update ([Cls_target], [Class_preds.transpose ((0,2,1))]) box_metric.update ([Box_target], [box_preds * Box_mask]) cls_metric.get () Box_metric.get ()
Gluon.loss.Loss
Class Focalloss (Gluon.loss.Loss):    def __init__ (self, axis=-1, alpha=0.25, gamma=2, Batch_axis=0, **kwargs):        Super (Focalloss, self). __init__ (None, Batch_axis, **kwargs)        self._axis = Axis        Self._alpha = Alpha        self._ Gamma = Gamma    def hybrid_forward (self, f, output, label):        # here ' F ' can is either mx.nd or Mx.sym        # here use F instead of F Orward explicitly specify both for ease of use        # so non-hybrid without this parameter        output = F.softmax (output)        PJ = output.pick (label, Axis=self._axis, Keepdims=true)        loss =-Self._alpha * ((1-PJ) * * self._gamma) * Pj.log ()        return Loss.mean (Axis=self._batch_axi S, exclude=true)
Mxnet.contrib.ndarray.MultiBoxTarget
def training_targets (anchors, class_preds, labels): "" "Get all the border    coordinates to    get all the borders of each category score    real category and corresponding border coordinates    " ""    class_preds = Class_preds.transpose (axes= (0,2,1))    
Mxnet.contrib.ndarray.MultiBoxDetection

"MXNet" Eighth bomb _ object detection of SSD

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.