美国高通 Snapdragon Neural Processing Engine SDK (SNPE) 系列 (1):用户自定义层JNI实现

深度学习——平台 专栏收录该内容
1 篇文章 0 订阅

转自:https://blog.csdn.net/guvcolie/article/details/77937786

        Snapdragon Neural Processing Engine SDK是美国高通公司出品的神经网络处理引擎(SNPE),可运行于搭载了高通Zeroth机器智能平台的820芯片处理器,开发者可以在SNPE上搭建自己的深度学习网络模型。更详细的介绍可以登录高通SNPE相关网页了解:https://developer.qualcomm.com/software/snapdragon-neural-processing-engine 。介绍到此为止。        

         最近在用snpe做一个项目,将tensorflow的pb模型转为snpe的dlc模型,并利用snpe将模型运行在骁龙GPU上。但不得不说,snpe目前做的还不是非常完美,有些需要定制化的神经网络层可能在原生snpe中没有提供。但还好高通提供了用户定义层(UDL)功能,通过回调函数可以自定义算子,并通过重编译C++代码将自定义文件编译到可执行文件中。如果开发就是使用的C++,那比较容易实现用户定义层,但如果是运行在Android上就比较麻烦了,上层java代码需要通过JNI来调用snpe原生的C++编译好的.so文件,因为用户定义层的代码是不可能预先编译到snpe原生.so文件中的,所以用snpe提供的Java API是无法获得用户定义层的功能的,所以,必须重新开发SNPE的JNI。        

       出于涉密考虑,用户定义层的代码我不会展示,只展示JNI的骨架代码,关于用户定义层(UDL)的实现可以参阅SNPE的相关文档。        

Java层的代码: 

public class SnpeController {
 
    public enum Runtime {
        CPU,
        GPU,
        DSP
    }
 
    private int height = 0;  
    private int width = 0;  
    private int channel = 0;  
    private Runtime runtimeMode = Runtime.GPU;  
    private String loggerDir = "";  
    private String modelFilePath = "";  
    private long containerPointer = 0; 
    private long snpePointer = 0; 
    private float[] inputData = null;  
    private int inputLength = 0;  
    private float[] outputData = null;  
 
    public SnpeController(int imageHeight,
                          int imageWidth,
                          int imageChannel,
                          String modelPath) {
        this(imageHeight, imageWidth, imageChannel, modelPath, Runtime.CPU, "/home/mi/snpe_log_dir/");
    }
 
    public SnpeController(int imageHeight,
                          int imageWidth,
                          int imageChannel,
                          String modelPath,
                          Runtime runtimeMode,
                          String loggerDir) {
        setImageShape(imageHeight, imageWidth, imageChannel);
        setModelPath(modelPath);
        setRuntime(runtimeMode);
        setLoggerDir(loggerDir);
    }
 
    public void setImageShape(int height,
                              int width,
                              int channel){
        this.height = height;
        this.width = width;
        this.channel = channel;
    }
 
    public void setModelPath(String modelPath){
        modelFilePath = modelPath;
    }
 
    public void setRuntime(Runtime runtime){
        runtimeMode = runtime;
    }
 
    public void setLoggerDir(String path){
        loggerDir = path;
    }
 
    public boolean initModel(){
        if(!checkStatus())
            return false;
        long modelPointer = initContainer(modelFilePath);
        if (modelPointer == 0)
            return false;
        containerPointer = modelPointer;
        int runtime = 0;
        switch(runtimeMode){
            case CPU:
                runtime = 0;
                break;
            case GPU:
                runtime = 1;
                break;
            case DSP:
                runtime = 2;
                break;
            default:
                break;
        }
        long snpePointer = initSnpe(containerPointer, runtime);
        if (snpePointer == 0)
            return false;
        this.snpePointer = snpePointer;
        return true;
    }
 
    public boolean input(float[] imageData,
                         int length){
        if (height * width * channel != length)
            return false;
        inputData = imageData;
        inputLength = length;
        return true;
    }
 
    public boolean forward(){
        if (inputData == null || inputLength <= 0)
            return false;
        outputData = exec(snpePointer, inputData, inputLength);
        inputData = null;
        inputLength = 0;
        return true;
    }
 
    public float[] output(){
        return outputData;
    }
 
    public void release(){
        if (containerPointer != 0 || snpePointer != 0)
            releaseSource(containerPointer, snpePointer);
        inputData = null;
        outputData = null;
    }
 
    private boolean checkStatus(){
        if (height <= 0 || width <= 0 || channel <= 0) {
            System.out.println("image shape value is illegal!");
            return false;
        }
        return true;
    }
 
 
   
    private native long initContainer(String dlcFilePath);
    private native long initSnpe(long containerPointer, int runtimeMode);
    private native float[] exec(long snpePointer, float[] data, int length);
    private native void releaseSource(long containerPointer, long snpePointer);
 
    static {
        try {
            System.loadLibrary("SnpeController");
        } catch (UnsatisfiedLinkError e) {
            e.printStackTrace();
        }
    }
}

通过javac、javah命令,可以生成C++的.H头文件: -

/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class SnpeController_Runtime */
 
#ifndef _Included_SnpeController_Runtime
#define _Included_SnpeController_Runtime
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif
 
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class SnpeController */
 
#ifndef _Included_SnpeController
#define _Included_SnpeController
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     SnpeController
 * Method:    initContainer
 * Signature: (Ljava/lang/String;)J
 */
JNIEXPORT jlong JNICALL Java_SnpeController_initContainer
  (JNIEnv *, jobject, jstring);
 
/*
 * Class:     SnpeController
 * Method:    initSnpe
 * Signature: (JI)J
 */
JNIEXPORT jlong JNICALL Java_SnpeController_initSnpe
  (JNIEnv *, jobject, jlong, jint);
 
/*
 * Class:     SnpeController
 * Method:    exec
 * Signature: (J[FI)[F
 */
JNIEXPORT jfloatArray JNICALL Java_SnpeController_exec
  (JNIEnv *, jobject, jlong, jfloatArray, jint);
 
/*
 * Class:     SnpeController
 * Method:    releaseSource
 * Signature: (JJ)V
 */
JNIEXPORT void JNICALL Java_SnpeController_releaseSource
  (JNIEnv *, jobject, jlong, jlong);
 
#ifdef __cplusplus
}
#endif
#endif

根据头文件,对相关函数进行实现: 

#include "ABCDE.h"
 
using namespace std;
 
namespace udlexample
{
zdl::DlSystem::IUDL * MyUDLFactory(void * cookie, const zdl::DlSystem::UDLContext * c) {
    ...
    if (type == "XXX") {
        return new udls::XXXLayer(*c);
    } else if (type == "YYY") {
        return new udls::YYYLayer(*c);
    } else {
        _PrintErrorStringAndExit("Unknown layer type: " + type);
    }
    return nullptr;
}
}
 
JNIEXPORT jlong JNICALL Java_SnpeController_initContainer(JNIEnv * env,
                                                          jobject arg,
                                                          jstring dlcFilePath)
{
    unique_ptr<zdl::DlContainer::IDlContainer> container;
    string containerPath =  _JstringToChar(env, dlcFilePath);
#ifdef DebugInfo
    cout << "#### container path is :" << containerPath << endl;
#endif
    container = zdl::DlContainer::IDlContainer::open(containerPath);
    if (!container) {
        PrintErrorStringAndExit();
    }
#ifdef DebugInfo
    cout << "#### succeed to load container!" << endl;
    cout << "#### container pointer addr is " << (long)container.get() << endl;
#endif
    zdl::DlContainer::IDlContainer * p = container.release();
#ifdef DebugInfo
    cout << "#### release container unique_ptr!" << endl;
    cout << "#### container common pointer addr is " << (long)p << endl;
#endif
    return (long)p;
}
 
 
JNIEXPORT jlong JNICALL Java_SnpeController_initSnpe(JNIEnv * env,
                                                     jobject arg,
                                                     jlong container,
                                                     jint runtime)
{
    zdl::DlContainer::IDlContainer * tmp = (zdl::DlContainer::IDlContainer *)container;
#ifdef DebugInfo
    cout << "#### function init_snpe get container pointer: " << (long)tmp << endl;
#endif
    if (!zdl::SNPE::SNPEFactory::isRuntimeAvailable(_getRuntime(runtime))) {
        _PrintErrorStringAndExit("runtime is inavailable!!");
    }
    unique_ptr<zdl::SNPE::SNPE> snpe;
    zdl::DlSystem::UDLBundle udlBundle;
    udlBundle.cookie = (void *) 0xdeadbeaf;
    udlBundle.func = udlexample::MyUDLFactory;
    zdl::SNPE::SNPEBuilder snpeBuilder(tmp);
    snpe = snpeBuilder.setOutputLayers({})
          .setRuntimeProcessor(_getRuntime(runtime))
          .setUdlBundle(udlBundle)
          .build();
    if (!snpe)
        PrintErrorStringAndExit();
#ifdef DebugInfo
    cout << "####  succeed to init snpe instance!" << endl;
#endif
    auto logger_opt = snpe->getDiagLogInterface();
    if (!logger_opt)
        _PrintErrorStringAndExit("SNPE failed to obtain logging interface");
    auto logger = *logger_opt;
    auto opts = logger->getOptions();
    //##################################################################################################################
    opts.LogFileDirectory = "/home/mi/snpe_log_dir/";
    if (!logger->setOptions(opts))
        _PrintErrorStringAndExit("Failed to set logger options!");
#ifdef DebugInfo
    cout << "#### succeed to set logger options!!" << endl;
#endif
    if (!logger->start())
        _PrintErrorStringAndExit("Failed to start snpe logger!");
#ifdef DebugInfo
    cout << "#### succeed to start snpe logger!" << endl;
#endif
    string version_string = zdl::SNPE::SNPEFactory::getLibraryVersion().toString();
#ifdef DebugInfo
    cout << "#### snpe version: " << version_string << endl;
#endif
    zdl::SNPE::SNPE * p = snpe.release();
#ifdef DebugInfo
    cout << "#### release snpe unique_ptr!" << endl;
    cout << "#### snpe common pointer addr is " << (long)p << endl;
#endif
    return (long)p;
}
 
 
JNIEXPORT jfloatArray JNICALL Java_SnpeController_exec(JNIEnv * env,
                                                       jobject arg,
                                                       jlong snpe,
                                                       jfloatArray data,
                                                       jint length)
{
    if (data == NULL || length <= 0)
        _PrintErrorStringAndExit("exec function: data illegal!");
    zdl::SNPE::SNPE * tmp_snpe = (zdl::SNPE::SNPE *)snpe;
#ifdef DebugInfo
    cout << "#### function exec get snpe pointer: " << (long)tmp_snpe << endl;
#endif
    if (tmp_snpe == NULL)
        _PrintErrorStringAndExit("exec function: snpe pointer null!");
    zdl::DlSystem::TensorMap outputTensorMap;
    const auto &strList_opt = tmp_snpe->getInputTensorNames();
    if (!strList_opt)
        _PrintErrorStringAndExit("Error obtaining Input tensor names!");
    const auto &strList = *strList_opt;
#ifdef DebugInfo
    cout << "#### have "<< strList.size() << " input tensor(s) to net."<< endl;
    for(int index = 0; index < strList.size(); index++)
        cout << "#### input tensor " << index << "'s name is " << strList.at(index) << endl;
#endif
    const auto &inputDims_opt = tmp_snpe->getInputDimensions(strList.at(0));
    if (!inputDims_opt)
        _PrintErrorStringAndExit("fail to obtain input dimensions!");
    const auto &inputShape = *inputDims_opt;
    size_t inputSize = std::accumulate(inputShape.getDimensions(),
                                       inputShape.getDimensions() + inputShape.rank(),
                                       1,
                                       std::multiplies<size_t>());
#ifdef DebugInfo
    cout << "#### input tensor size of model is: " << inputSize << endl;
#endif
    if (inputSize != length)
        _PrintErrorStringAndExit("input tensor size of model doesn't match image size!");
    const jfloat * inputData = (const jfloat *)env->GetFloatArrayElements(data, JNI_FALSE);
    vector<float> inputVec(inputSize);
    for (int i = 0; i < inputVec.size(); ++i)
        inputVec[i] = inputData[i];
    env->ReleaseFloatArrayElements(data, (jfloat *)inputData, 0);
    unique_ptr<zdl::DlSystem::ITensor> input = zdl::SNPE::SNPEFactory::getTensorFactory().createTensor(inputShape);
    std::copy(inputVec.begin(), inputVec.end(), input->begin());
    if (!tmp_snpe->execute(input.get(), outputTensorMap))
        PrintErrorStringAndExit();
    zdl::DlSystem::StringList tensorNames = outputTensorMap.getTensorNames();
#ifdef DebugInfo
    cout << "#### have " << tensorNames.size() << " output tensor(s) from net." << endl;
#endif
    const char ** outputTensorNamePtr = tensorNames.begin();
    zdl::DlSystem::ITensor * tensorPtr = outputTensorMap.getTensor(*outputTensorNamePtr);
#ifdef DebugInfo
    cout << "#### output tensor size is " << tensorPtr->getSize() << endl;
#endif
    float * tmpOutput = (float *)malloc(sizeof(float) * tensorPtr->getSize());
    jfloatArray outputResult = env->NewFloatArray(tensorPtr->getSize());
    auto p = tensorPtr->cbegin();
    int outputIndex = 0;
    while(p != tensorPtr->cend())
    {
        tmpOutput[outputIndex++] = *p;
//        cout << *p << " ";
        p++;
    }
    env->SetFloatArrayRegion(outputResult, 0, tensorPtr->getSize(), tmpOutput);
#ifdef DebugInfo
    cout << "#### succeed to exec!!!!" << endl;
#endif
    return outputResult;
}
 
 
JNIEXPORT void JNICALL Java_SnpeController_releaseSource(JNIEnv * env,
                                                         jobject arg,
                                                         jlong container,
                                                         jlong snpe)
{
    if (snpe != 0)
        delete (zdl::SNPE::SNPE *)snpe;
    if (container != 0)
        delete (zdl::DlContainer::IDlContainer *)container;
}


 

  • 0
    点赞
  • 2
    评论
  • 1
    收藏
  • 扫一扫,分享海报

评论2
请先登录 后发表评论~
<p style="margin: 0cm; background: white;"><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">本课程使用<span lang="EN-US">YOLOv5</span>和<span lang="EN-US">DeepSORT</span>对视频中的行人、车辆做多目标跟踪和计数,开展<span lang="EN-US">YOLOv5</span>目标检测和<span lang="EN-US">DeepSORT</span>多目标跟踪强强联手的应用。</span></p> <p style="margin: 0cm; background: white;"><span lang="EN-US" style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;"> </span><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">课程分别在</span><span lang="EN-US"><span style="box-sizing: border-box;">Windows</span>和</span><span lang="EN-US" style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-color-alt: windowtext;">Ubuntu</span><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">系统上做项目演示,并对<span lang="EN-US">DeepSORT</span>原理和代码做详细解读(使用<span lang="EN-US">PyCharm</span>单步调试讲解)。</span></p> <p style="margin: 0cm; background: white;"><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Arial',sans-serif; color: black; mso-themecolor: text1;"> </span></p> <p style="margin: 0cm; background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;"><span style="box-sizing: border-box;"><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">课程包括:<span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">基础篇、实践篇、原理篇和代码解析篇。</span></span></span></p> <p style="text-indent: -21.0pt; mso-list: l0 level1 lfo1; background: white; margin: 0cm 0cm 0cm 21.0pt;"><!-- [if !supportLists]--><span lang="EN-US" style="font-size: 14.0pt; mso-bidi-font-size: 10.5pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1;"><span style="mso-list: Ignore;">Ÿ<span style="font: 7.0pt 'Times New Roman';">  </span></span></span><!--[endif]--><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">基础篇包括多目标跟踪任务介绍、数据集和评估指标;</span></p> <p style="text-indent: -21.0pt; mso-list: l0 level1 lfo1; background: white; margin: 0cm 0cm 0cm 21.0pt;"><!-- [if !supportLists]--><span lang="EN-US" style="font-size: 14.0pt; mso-bidi-font-size: 10.5pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1;"><span style="mso-list: Ignore;">Ÿ<span style="font: 7.0pt 'Times New Roman';">  </span></span></span><!--[endif]--><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">实践篇包括</span><span lang="EN-US" style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">Win10</span><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">和<span lang="EN-US">Ubuntu</span>系统上的<span lang="EN-US">YOLOv5+DeepSORT</span>的多目标跟踪和计数具体的实践操作步骤演示,特别是对行人、车辆的<span lang="EN-US">ReID</span>数据集讲解了训练方法;</span></p> <p style="text-indent: -21.0pt; mso-list: l0 level1 lfo1; background: white; margin: 0cm 0cm 0cm 21.0pt;"><!-- [if !supportLists]--><span lang="EN-US" style="font-size: 14.0pt; mso-bidi-font-size: 10.5pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1;"><span style="mso-list: Ignore;">Ÿ<span style="font: 7.0pt 'Times New Roman';">  </span></span></span><!--[endif]--><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">原理篇中讲解了马氏距离、匈牙利算法、卡尔曼滤波器的原理,并解读了<span lang="EN-US">SORT</span>和<span lang="EN-US">DeepSORT</span>论文;</span></p> <p style="text-indent: -21.0pt; mso-list: l0 level1 lfo1; background: white; margin: 0cm 0cm 0cm 21.0pt;"><!-- [if !supportLists]--><span lang="EN-US" style="font-size: 14.0pt; mso-bidi-font-size: 12.0pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1;"><span style="mso-list: Ignore;">Ÿ<span style="font: 7.0pt 'Times New Roman';">  </span></span></span><!--[endif]--><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;">代码解析篇中使用<span lang="EN-US">PyCharm</span>单步调试对<span lang="EN-US">DeepSORT</span>的代码逐个文件进行讲解。课程提供注释后的代码。</span></p> <p style="text-indent: -21.0pt; mso-list: l0 level1 lfo1; background: white; margin: 0cm 0cm 0cm 21.0pt;"><span style="font-size: 10.5pt; font-family: '微软雅黑',sans-serif; mso-bidi-font-family: Arial; color: black; mso-themecolor: text1;"><img src="https://img-bss.csdnimg.cn/202105101512471836.jpg" alt="课程内容" /></span></p> <p><img src="https://img-bss.csdnimg.cn/202105101513384587.jpg" alt="行人多目标跟踪" /></p> <p><img src="https://img-bss.csdnimg.cn/202105101514053124.jpg" alt="车辆计数" /></p>
密码:看注释 解压密码146359085 《excel服务器2017程序v3.9》使用说明: 1、本程序支持《excel服务器2017、excel服务器2016、excel服务器2015、excel服务器2013、excel服务器2010》等最新版本版本,不支持excel服务器2019。 2、MSSQL请不要使用空密码,否则注册程序可能失效。 2、本程序没有注册的话,为试用版,用户数最大为10用户,注册后没有限制。 3、安装和装卸本程序时请先停止excel服务器2017的服务。 4、使用本程序时请先删除本软件以前的旧版本补丁。 5、如果下载完整版的升级程序升级,前请先装卸本软件,更新升级后再使用用本软件安装解密。 6、本程序正式版分为标准版及加强版两个版本,标准版只能在你注册的电脑上生效,加强版可以通过下面的操作为其他的excel服务器授权。 7、本程序及其相关内容信息只作为学习、测试使用,严禁用于其它用途!!!、 由于使用本程序而产生的任何后果,请您自已负责!  当您使用了本程序及其相关内容信息后,都将视为接受本警告并自愿承担所有责任!!! 3.9更新说明: 1、修改软件的解密方法,避免后期官方对本软件的检测。 2、修复已知BUG。 3、修复硬件码会变动失效的Bug。 4、新增加对聚表2.6.7的支持。 3.8更新说明: 1、支持《excel服务器2017》。 其他说明: 《excel服务器2016注册程序v3.9加强版》可以用下面步骤为其他服务器授权: 1、在其他安装excel服务器的电脑上运行本软件及安装,并记下硬件码; 2、到安装有正式注册版的那台电脑上运行本软件,把步骤1得到的硬件码填入软件界面上的硬件码位置,设置好选项,然后安装; 3、安装后,打开勤哲安装目录,在目录下找到ESWint12.ini这个文件,把他复制出来。 4、回到步骤1的那台电脑上,把ESWint12.ini覆盖到勤哲的安装目录下,停止excel服务器的服务并从新启动,如果以上步骤没有错误,那这时这台电脑上的excel服务器就是正式注册了。 5、注册时两台电脑要安装同一版本的excel服务器。 《聚表企业版2.6.7》的使用方法: 1、找作者开通聚表权限。 2、在《nxcells服务器配置》复制出机器码,把机器码填入本软件《硬件码》中,版本选择《聚表企业版2.6.7》按安装即可生成授权。 3、把server.nks复制到聚表企业版2.6.7的server目录下,从新启动服务即可。
<span> </span> <div> 以通俗简介的方式,从浅入深介绍SVM原理和代码流程 让你从此不再惧怕SVM <br /> </div> <div> <p> <br /> </p> <p> <br /> </p> <p> <strong><span style="color:#E53333;">视频部分:</span></strong> </p> </div> 01_SVM之回顾梯度下降原理<br /> 02_SVM之回顾有约束的最优化问题<br /> 03_SVM之回顾有约束的最优化问题-KKT几何解释<br /> 04_SVM之回顾有约束的最优化问题-KKT数学解释<br /> 05_SVM之回顾距离公式和感知器模型<br /> 06_SVM之感知器到SVM的引入<br /> 07_SVM之线性可分时损失函数的表示<br /> 08_SVM之线性可分时损失函数的求解-对w,b变量求偏导<br /> 09_SVM之线性可分时损失函数的求解-对β变量求解.<br /> 10_SVM之线性可分时算法整体流程<br /> 11_SVM之线性可分时案例<br /> 12_SVM之线性不可分时软间隔介绍<br /> 13_SVM之线性不可分时软间隔优化目标<br /> 14_SVM之线性不可分时软间隔算法整体流程<br /> 15_SVM之线性不可分时数据映射高维解决不可分问题<br /> 16_SVM之线性不可分时核函数引入<br /> 17_SVM之线性不可分时核函数讲解<br /> 18_SVM代码之线性可分时和Logistic回归比较<br /> 19_SVM代码之基于鸢尾花数据多分类参数解释<br /> 20_SVM代码之基于鸢尾花数据网格搜索选择参数<br /> 21_SVM代码之不同分类器,核函数,C值的可视化比较<br /> <p> 22_SVM之回归方式SVR </p> <p> 23_SVM代码之SVR解决回归问题 </p> 24_SVM之SMO思想引入<br /> <p> 25_SVM之SMO案列讲解 </p> <p> <br /> </p> <p> <strong><span style="color:#E53333;">代码部分:</span></strong> </p> <p> <img src="https://img-bss.csdn.net/202005090648425294.png" alt="" /> </p> <p> <br /> </p> <p> <strong><span style="color:#E53333;">资料部分:</span></strong> </p> <p> <img src="https://img-bss.csdn.net/202005090649458459.png" alt="" /> </p>
©️2021 CSDN 皮肤主题: 创作都市 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值