[Metric] Accelerate the calculation of F1 (#9833)
[Metric] Accelerate the calculation of F1 (#9833)

* Accelerate the calculation of F1

* cache the mid results

* trigger CI

jamesliu/mxnet,ptrendx/mxnet,LinkHS/incubator-mxnet,dmlc/mxnet,CodingCat/mxnet,szha/mxnet,dmlc/mxnet,jiajiechen/mxnet,rahul003/mxnet,fullfanta/mxnet,larroy/mxnet,jiajiechen/mxnet,fullfanta/mxnet,tlby/mxnet,tornadomeet/mxnet,TuSimple/mxnet,indhub/mxnet,TuSimple/mxnet,fullfanta/mxnet,fullfanta/mxnet,sxjscience/mxnet,jamesliu/mxnet,mbaijal/incubator-mxnet,CodingCat/mxnet,reminisce/mxnet,TuSimple/mxnet,tornadomeet/mxnet,leezu/mxnet,zhreshold/mxnet,precedenceguo/mxnet,tlby/mxnet,yajiedesign/mxnet,ForkedReposBak/mxnet,zhreshold/mxnet,leezu/mxnet,precedenceguo/mxnet,navrasio/mxnet,apache/incubator-mxnet,yajiedesign/mxnet,szha/mxnet,TuSimple/mxnet,tornadomeet/mxnet,indhub/mxnet,luoyetx/mxnet,rahul003/mxnet,fullfanta/mxnet,szha/mxnet,tlby/mxnet,indhub/mxnet,LinkHS/incubator-mxnet,jiajiechen/mxnet,TuSimple/mxnet,ForkedReposBak/mxnet,leezu/mxnet,larroy/mxnet,CodingCat/mxnet,TuSimple/mxnet,luoyetx/mxnet,yajiedesign/mxnet,yajiedesign/mxnet,luoyetx/mxnet,CodingCat/mxnet,jiajiechen/mxnet,larroy/mxnet,precedenceguo/mxnet,LinkHS/incubator-mxnet,zhreshold/mxnet,reminisce/mxnet,apache/incubator-mxnet,szha/mxnet,navrasio/mxnet,szha/mxnet,zhreshold/mxnet,ptrendx/mxnet,zhreshold/mxnet,mbaijal/incubator-mxnet,precedenceguo/mxnet,larroy/mxnet,jamesliu/mxnet,LinkHS/incubator-mxnet,luoyetx/mxnet,tlby/mxnet,jamesliu/mxnet,sxjscience/mxnet,rahul003/mxnet,fullfanta/mxnet,dmlc/mxnet,larroy/mxnet,eric-haibin-lin/mxnet,mbaijal/incubator-mxnet,sxjscience/mxnet,tlby/mxnet,fullfanta/mxnet,eric-haibin-lin/mxnet,luoyetx/mxnet,mbaijal/incubator-mxnet,TuSimple/mxnet,rahul003/mxnet,navrasio/mxnet,navrasio/mxnet,CodingCat/mxnet,LinkHS/incubator-mxnet,reminisce/mxnet,sxjscience/mxnet,dmlc/mxnet,mbaijal/incubator-mxnet,fullfanta/mxnet,tornadomeet/mxnet,dmlc/mxnet,tornadomeet/mxnet,reminisce/mxnet,ptrendx/mxnet,DickJC123/mxnet,LinkHS/incubator-mxnet,precedenceguo/mxnet,ptrendx/mxnet,tornadomeet/mxnet,CodingCat/mxnet,dmlc/mxnet,rahul003/mxnet,szha/mxnet,tornadomeet/mxnet,reminisce/mxnet,fullfanta/mxnet,leezu/mxnet,navrasio/mxnet,indhub/mxnet,larroy/mxnet,CodingCat/mxnet,reminisce/mxnet,LinkHS/incubator-mxnet,navrasio/mxnet,precedenceguo/mxnet,ForkedReposBak/mxnet,szha/mxnet,larroy/mxnet,ptrendx/mxnet,reminisce/mxnet,ptrendx/mxnet,luoyetx/mxnet,DickJC123/mxnet,yajiedesign/mxnet,precedenceguo/mxnet,jamesliu/mxnet,tlby/mxnet,luoyetx/mxnet,LinkHS/incubator-mxnet,ptrendx/mxnet,tlby/mxnet,jiajiechen/mxnet,tlby/mxnet,sxjscience/mxnet,CodingCat/mxnet,ForkedReposBak/mxnet,DickJC123/mxnet,reminisce/mxnet,zhreshold/mxnet,tlby/mxnet,jiajiechen/mxnet,ForkedReposBak/mxnet,zhreshold/mxnet,navrasio/mxnet,mbaijal/incubator-mxnet,eric-haibin-lin/mxnet,jamesliu/mxnet,TuSimple/mxnet,ForkedReposBak/mxnet,eric-haibin-lin/mxnet,leezu/mxnet,eric-haibin-lin/mxnet,sxjscience/mxnet,jiajiechen/mxnet,indhub/mxnet,precedenceguo/mxnet,ForkedReposBak/mxnet,ForkedReposBak/mxnet,rahul003/mxnet,szha/mxnet,eric-haibin-lin/mxnet,dmlc/mxnet,ptrendx/mxnet,eric-haibin-lin/mxnet,rahul003/mxnet,rahul003/mxnet,CodingCat/mxnet,precedenceguo/mxnet,leezu/mxnet,TuSimple/mxnet,szha/mxnet,ptrendx/mxnet,navrasio/mxnet,sxjscience/mxnet,indhub/mxnet,yajiedesign/mxnet,leezu/mxnet,zhreshold/mxnet,yajiedesign/mxnet,LinkHS/incubator-mxnet,ptrendx/mxnet,sxjscience/mxnet,jamesliu/mxnet,rahul003/mxnet,eric-haibin-lin/mxnet,TuSimple/mxnet,reminisce/mxnet,mbaijal/incubator-mxnet,reminisce/mxnet,luoyetx/mxnet,larroy/mxnet,navrasio/mxnet,DickJC123/mxnet,dmlc/mxnet,apache/incubator-mxnet,jamesliu/mxnet,jiajiechen/mxnet,dmlc/mxnet,mbaijal/incubator-mxnet,indhub/mxnet,zhreshold/mxnet,larroy/mxnet,sxjscience/mxnet,yajiedesign/mxnet,jamesliu/mxnet,tlby/mxnet,leezu/mxnet,jiajiechen/mxnet,ForkedReposBak/mxnet,indhub/mxnet,apache/incubator-mxnet,indhub/mxnet,yajiedesign/mxnet,eric-haibin-lin/mxnet,mbaijal/incubator-mxnet,leezu/mxnet,tornadomeet/mxnet,luoyetx/mxnet,tornadomeet/mxnet