camvector.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:nnp 作者: dribnet 项目源码 文件源码
def do_roc(self):
        if self.gan_mode and self.dmodel2 is not None:
            dmodel_cur = self.dmodel2
            scale_factor = 2
        elif self.dmodel is not None:
            dmodel_cur = self.dmodel
            scale_factor = self.scale_factor
        else:
            theApp.cur_hist_tex = theApp.standard_hist_tex
            theApp.cur_roc_tex = theApp.standard_roc_tex
            return
        encoded_vector_source = self.get_encoded(dmodel_cur, self.cur_vector_source, scale_factor)
        encoded_vector_dest = self.get_encoded(dmodel_cur, self.cur_vector_dest, scale_factor)
        attribute_vector = encoded_vector_dest - encoded_vector_source
        threshold = None
        outfile = "{}/{}".format(roc_dir, get_date_str())
        do_roc(attribute_vector, encoded, attribs, attribute_index, threshold, outfile)
        hist_img = imread("{}_hist_both.png".format(outfile), mode='RGB')
        roc_img = imread("{}_roc.png".format(outfile), mode='RGB')
        hist_img = imresize(hist_img, roc_image_resize)
        roc_img = imresize(roc_img, roc_image_resize)
        theApp.cur_hist_tex = image_to_texture(hist_img)
        theApp.cur_roc_tex = image_to_texture(roc_img)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号