学习Linux/GNU/C++/C过程中遇到的问题

news2024/11/14 19:09:37

学习Linux/GNU/C++/C过程中遇到的问题

  • 1.源函数调用:
  • 2.linux静态库使用:
  • 3.vscode创建c++程序调用onnxruntime:
      • 问题1:找不到头文件或者未定义函数
      • 问题2:error while loading shared libraries: libonnxruntime.so.1.16.1: cannot open shared object file: No such file or directory
      • 典型使用demo:
  • 4. c++调用c源程序注意及c/c++区别:
      • 1.c及c++函数签名不同:c++为了函数重载,同一函数签名根据参数不同而不同:

1.源函数调用:

    c++文件调用另一个cpp文件:函数声明在libtest.h中,函数定义在libtest.cpp中,则test.cpp调用libtest.h中声明的函数时,使用#include "libtest.cpp"而不是“libtest.h”,否则出现函数未调用。c++调用c文件则include xxx.h头文件。

2.linux静态库使用:

    g++ -c libtest.cpp -o libtest.o编译源文件为目标文件.o

    ar rcs libtest.a libtest.o由.o目标文件生成静态库

    g++ test.cpp -o test -static -L.编译test.cpp,在test.cpp中include"libtest.cpp",-static指示使用静态链接,-L.指示在当前文件夹查找所需库文件,在-L.后加上 -lerr则便是在当前命令下查找库文件liberr,可使用file test查看是否成功静态链接

    运行./test可执行文件

3.vscode创建c++程序调用onnxruntime:

问题1:找不到头文件或者未定义函数

解决1:在task.json文件的args部分加上:
            "-I/tao/code/package/onnxruntime/include",//大写I表示include目录
            "-L/tao/code/package/onnxruntime/lib",//大写L表示.so共享库目录
            "-lonnxruntime",//小写l为lib库名称,库目录中文件全名为libonnxruntime.so,这里用l来表示lib
            最后:注意task或c_cpp_properties.json中编译器命令是否为g++,不用gcc;

问题2:error while loading shared libraries: libonnxruntime.so.1.16.1: cannot open shared object file: No such file or directory

解决2:tasks.json内指定库目录即名称任然报错,因为默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件.
通常通过源码包进行安装时,如果不指定–prefix,提示找不到相关的.so库,会报错。也就是说,.so文件目录不在系统默认的库搜索目录中,需要将目录加进去.
配置文件在:/etc/ld.so.conf文件中,将所在的库目录加入到共享库的配置文件中:执行vi /etc/ld.so.conf,在"include ld.so.conf.d/*.conf"下方增加/tao/code/package/onnxruntime/lib。
保存后,在命令行终端执行:/sbin/ldconfig -v和ldconfig.
其作用是将文件/etc/ld.so.conf列出的路径下的库文件缓存到/etc/ld.so.cache以供使用.
因此当安装完一些库文件,或者修改/etc/ld.so.conf增加了库的新搜索路径,需要运行一下ldconfig,
使所有的库文件都被缓存到文件/etc/ld.so.cache中,如果没做,可能会找不到刚安装的库。

典型使用demo:

#include <onnxruntime_cxx_api.h>

#include <cmath>
#include <algorithm>
#include <iostream>
#include <iomanip>

//#pragma comment(lib, "user32.lib")
//#pragma comment(lib, "gdi32.lib")
//#pragma comment(lib, "onnxruntime.lib")

template <typename T>
static void softmax(T& input) {
    float rowmax = *std::max_element(input.begin(), input.end());
    std::vector<float> y(input.size());
    float sum = 0.0f;
    for (size_t i = 0; i != input.size(); ++i) {
        sum += y[i] = std::exp(input[i] - rowmax);
    }
    for (size_t i = 0; i != input.size(); ++i) {
        input[i] = y[i] / sum;
    }
}

// This is the structure to interface with the MNIST model
// After instantiation, set the input_image_ data to be the 28x28 pixel image of the number to recognize
// Then call Run() to fill in the results_ data with the probabilities of each
// result_ holds the index with highest probability (aka the number the model thinks is in the image)
struct MNIST {
    MNIST() {
        auto memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeCPU);
        input_tensor_ = Ort::Value::CreateTensor<float>(memory_info, input_image_.data(), input_image_.size(),input_shape_.data(), input_shape_.size());
        output_tensor_ = Ort::Value::CreateTensor<float>(memory_info, results_.data(), results_.size(),output_shape_.data(), output_shape_.size());
    }
    std::ptrdiff_t Run() {
        const char* input_names[] = { "Input3" };
        const char* output_names[] = { "Plus214_Output_0" };

        Ort::RunOptions run_options;
        session_.Run(run_options, input_names, &input_tensor_, 1, output_names, &output_tensor_, 1);
        softmax(results_);
        result_ = std::distance(results_.begin(), std::max_element(results_.begin(), results_.end()));
        return result_;
    }
    static constexpr const int width_ = 28;
    static constexpr const int height_ = 28;
    std::array<float, width_* height_> sneakers = { 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0039,0.0078,0.0000,0.0000,0.0000,0.0000,0.0000,0.2431,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0431,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.5725,0.6902,0.4510,0.7137,0.1137,0.0000,0.0000,0.0000,0.0157,0.0000,0.0000,0.4588,0.7922,0.0471,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0078,0.0039,0.0000,0.0000,0.0000,0.1333,0.9255,0.5765,0.4941,0.4392,0.6392,0.6902,0.0000,0.0000,0.0000,0.0000,0.0000,0.3647,0.8000,0.8510,0.2039,0.0000,0.0000,0.0000,0.0039,0.0000,0.0039,0.0000,0.0000,0.0000,0.0235,0.1176,0.9255,0.4902,0.4627,0.2824,0.4078,0.4510,0.4784,0.7451,0.9333,0.4588,0.1451,0.1255,0.3569,0.7804,0.7843,0.6667,0.0980,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.2392,0.2392,0.7412,0.6392,0.3137,0.3216,0.4314,0.4941,0.4941,0.5294,0.5333,0.4510,0.6863,0.8667,0.8392,0.7922,0.8667,0.7529,0.5294,0.7412,0.1529,0.0000,0.0000,0.0000,0.0000,0.0000,0.1412,0.2039,0.5843,0.7412,0.2549,0.2980,0.3922,0.4353,0.4510,0.4627,0.4745,0.5020,0.5333,0.4784,0.3529,0.3804,0.5333,0.6706,0.6745,0.4118,0.3529,0.8667,0.1294,0.1451,0.4902,0.4039,0.4353,0.4863,0.5059,0.4353,0.3333,0.3804,0.4667,0.4588,0.4039,0.4196,0.4471,0.5333,0.6275,0.6745,0.7098,0.7373,0.7725,0.7294,0.5765,0.4353,0.3686,0.4392,0.6667,0.7961,0.2980,0.5569,0.7373,0.7098,0.7098,0.6980,0.6392,0.5882,0.4941,0.4078,0.4196,0.5490,0.6314,0.7373,0.8000,0.8353,0.8667,0.8824,0.8824,0.8549,0.8196,0.5725,0.7804,1.0000,0.9882,0.8235,0.8196,0.8078,0.1569,0.2275,0.4863,0.6000,0.6667,0.7176,0.7373,0.6824,0.7137,0.6549,0.7843,0.8275,0.8118,0.8000,0.7412,0.7647,0.5843,0.3333,0.4078,0.7294,0.0000,0.0000,0.0000,0.0510,0.0902,0.0902,0.0471,0.0235,0.0706,0.0588,0.1059,0.0078,0.0078,0.0196,0.0510,0.1843,0.2706,0.5569,0.2784,0.0980,0.0235,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.1059,0.2824,0.0980,0.0902,0.0784,0.0431,0.0471,0.0902,0.1451,0.1843,0.0000,0.1137,0.2706,0.2863,0.2667,0.2039,0.0314,0.2235,0.1333,0.0000,0.0235,0.1020,0.1529,0.1529,0.1882,0.2235,0.2275,0.2118,0.1059,0.2549,0.3373,0.1529,0.1725,0.1608,0.1686,0.2118,0.2588,0.1843,0.0000,0.0000,0.0000,0.0000,0.1412,0.1765,0.1765,0.2863,0.2157,0.2863,0.3137,0.2588,0.2392,0.2314,0.1882,0.1529,0.1686,0.1765,0.2000,0.1725,0.2314,0.1608,0.1765,0.2275,0.2275,0.1765,0.1412,0.0039,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
    };
    std::array<float, width_* height_> input_image_ = sneakers;
    std::array<float, 10> results_{};
    int64_t result_{ 0 };
private:
    Ort::Env env;
    Ort::Session session_{ env, "mnist.onnx", Ort::SessionOptions{nullptr} };
    Ort::Value input_tensor_{ nullptr };
    std::array<int64_t, 4> input_shape_{ 1, 1, width_, height_ };
    Ort::Value output_tensor_{ nullptr };
    std::array<int64_t, 2> output_shape_{ 1, 10 };
};
using namespace std;
int main(void)
{
    char* labellist[10] = { "T - shirt" ," pants "," pullover","qunzhi"," coat"," sandals "," shirt","yundongxie","bag","ankle boots" };
    struct MNIST *mnist = new MNIST();
     mnist->Run();
    cout << setiosflags(ios::fixed)<<setprecision(5);
    std::cout << "result0:" << mnist->results_[0]<<endl;
    std::cout << "result1:" << mnist->results_[1] << endl;
    std::cout << "result2:" << mnist->results_[2] << endl;
    std::cout << "result3:" << mnist->results_[3] << endl;
    std::cout << "result4:" << mnist->results_[4] << endl;
    std::cout << "result5:" << mnist->results_[5] << endl;
    std::cout << "result6:" << mnist->results_[6] << endl;
    std::cout << "result7:" << mnist->results_[7] << endl;
    std::cout << "result8:" << mnist->results_[8] << endl;
    std::cout << "result9:" << mnist->results_[9] << endl;
    std::cout << "over" << endl;
    cout << "the result:  " << mnist->result_ << endl;
    cout << "the result:  " << labellist[mnist->result_] << endl;
    return 0;

4. c++调用c源程序注意及c/c++区别:

1.c及c++函数签名不同:c++为了函数重载,同一函数签名根据参数不同而不同:

//libtest.c文件
#include <stdio.h>
#include "libtest.h"
int area(int x,int y)
{
return x*y;
}

使用gcc -c libtest.c -o libtest.o生成目标文件后使用objdump -t libtest.o查看函数签名:
在这里插入图片描述

//libtest.cpp
#include <iostream>
#include "libtest.h"
using namespace std;
int area(int x,int y)
{
    cout<<"result"; 
    return x*y;
}

使用g++ -c libtest.cpp -o libtest.o生成目标文件,再使用objdump -t libtest.o查看,结果如下图。
可看到函数area的数字签名为Z4areaii,其中ii表示两个int类型的参数,如果是double的则是d。以此区别函数重载的各个函数。
因此cpp程序不能直接调用c程序,否则出现函数未定义。
在这里插入图片描述
如要在cpp中调用c程序,则在.h文件中使用extern “C”,对应的.c文件不变,如图:最开始#ifdef判断是否是g++编译器,因为c++编译器默认定义了__cplusplus符号,extern "C“指示c++编译器按c的方式生成函数签名,extern "C”不能被c编译器编译,所以用#ifdef判断。libtest.c和libtest.h如下所示:
在这里插入图片描述

gcc -c libtest.c -o libtest.o生成目标文件
ar cr -o libtest.a libtest.o生成静态库
gcc -o main main.cpp -L. -ltest -lstdc++//main.cpp会用libtest.a静态库,因为使用的gcc编译器c++,因此指明使用stdc++库
./main即可正常运行

使用 ldd main可查看对应的库:stdc++,使用g++编译c++程序会自动指明使用该库,使用gcc则单独指明-lstdc++
即gcc -c libtest.cpp -o libtest.o -lstdc++
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1152814.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

HQChart使用教程97-K线X轴滚动条

HQChart使用教程97-K线X轴滚动条 效果图创建步骤1. 创建滚动条div2. 初始化滚动条实例3. 配置滚动条属性4. 创建滚动条5. K线图和滚动条绑定6. 滚动条显示位置 完整示例HQChart代码地址 效果图 示例地址&#xff1a;https://jones2000.github.io/HQChart/webhqchart.demo/sampl…

Python武器库开发-高级特性篇(十)

高级特性篇(十) 多进程 多进程就是指通过应用程序利用计算机的多核资源达到同时执行多个任务的目的&#xff0c;以此来提升程序的执行效率 import os from multiprocessing import Processdef hello(name):#获取当前进程#os.getpid()print(process {}.format(os.getpid()))p…

内衣洗衣机和手洗哪个干净?好用的内衣洗衣机测评

最近一段时间&#xff0c;关于内衣到底是机洗好&#xff0c;还是手洗好这个话题&#xff0c;有很多人都在讨论&#xff0c;坚决的手洗党觉得应该用手来清洗&#xff0c;机洗与其它衣物混合使用&#xff0c;会产生交叉感染&#xff0c;而且随着使用时间的推移&#xff0c;会变得…

【ChatGLM2-6B】从0到1部署GPU版本

准备机器资源 显卡: 包含NVIDIA显卡的机器&#xff0c;如果是阿里云服务器可以选择ecs.gn6i-c4g1.xlarge规格硬盘: 大约50G左右操作系统: CentOS 7.9 64位CPU内存: 4C16G 更新操作系统 sudo yum update -y sudo yum upgrade -y下载并安装anaconda 在命令行中&#xff0c;输…

python--杂识--15--python调用c代码

两种方法&#xff1a; Python/C apictypes 1 Python/C api 1.1编写代码 c_test.c #include <Python.h>// C的原生函数&#xff0c;实现两个整数的相加 int add(int a, int b) {return a b; };// compute_add【一般&#xff1a;模块名_函数名】&#xff0c;按照pyth…

渗透测试-Fastjson反序列化漏洞getshell

目录 前言 测试环境准备 dnslog测试 搭建rmi服务器&准备恶意类 引用JdbcRowSetImpl攻击 反弹shell$命令执行 总结 关键字&#xff1a;fastjson 1.2.24反序列化导致任意命令执行漏洞 注&#xff1a;本次渗透测试全在虚拟机中进行仅用于学习交流&#xff0c;请勿在实…

直播间讨论区需要WebSocket,简单了解下

由于 http 存在一个明显的弊端&#xff08;消息只能有客户端推送到服务器端&#xff0c;而服务器端不能主动推送到客户端&#xff09;&#xff0c;导致如果服务器如果有连续的变化&#xff0c;这时只能使用轮询&#xff0c;而轮询效率过低&#xff0c;并不适合。于是 WebSocket…

QT-- out of memory, returning null image

提示&#xff1a;本文为学习内容&#xff0c;若有错误&#xff0c;请及时联系作者&#xff0c;谦虚受教 文章目录 前言一、崩溃信息二、错误原因1.QImage2.QStandardItemModel 三、问题解决总结 前言 学如逆水行舟&#xff0c;不进则退。 一、崩溃信息 崩溃信息: QImage: out…

UIButton

titleEdgeInsets和imageEdgeInsets titleEdgeInsets和imageEdgeInsets的作用是用来移动btn两个子空间的排布的 它们只是image和label相较于原来位置的偏移量&#xff0c;那什么是原来的位置呢&#xff1f;其实就是不设置Insets的那个状态。下面为不设置insets的状态。 默认情…

AGMZE-A-32/100、AGMZE-A-10/350比例溢流阀控制器

AGMZO-A-10/315、AGMZO-A-20/210、AGMZO-A-32/100、AGMZO-A-10/50、AGMZO-A-20/350、AGMZE-A-10/50、AGMZE-A-20/210、AGMZE-A-32/100、AGMZE-A-10/350、AGMZE-A-20/50锥阀型&#xff0c;先导式&#xff0c;数字型比例溢流阀&#xff0c;用于压力开环控制。 A型&#xff0c;与…

风格迁移常用代码

nn.MSELoss均方损失函数 LPIPS感知损失 学习感知图像块相似度(Learned Perceptual Image Patch Similarity, LPIPS)也称为“感知损失”(perceptual loss)&#xff0c;用于度量两张图像之间的差别&#xff0c;来源于论文《The Unreasonable Effectiveness of Deep Features as …

C# Dictionary类,确实有点东西

前言&#xff1a; 今天这篇文章是对Dictionary类的学习&#xff0c;Dictionary类是一个字典序&#xff0c;我们在编程中经常用到&#xff0c;它算是enum枚举类型和list类型的结合&#xff0c;是以键值对的形式去存储值的&#xff0c;那么你会这个知识点不&#xff0c;不会那么…

csapp datalab

知识点总结 1. 逻辑运算符关系 and&#xff08;与&#xff09;、or&#xff08;或&#xff09;和xor&#xff08;异或&#xff09;是逻辑运算符&#xff0c;用于对布尔值进行操作。它们可以在不同的逻辑表达式之间进行转换。下面是and、or和xor之间的转换规则&#xff1a; a…

答题小程序源码个人每日答题怎么做

答题小程序源码之个人每日答题怎么做 该模式以个人学习答题的方式进行答题&#xff0c;每人每天有X次答题机会&#xff0c;答对一题得X分&#xff0c;连续答对有额外奖励积分&#xff0c;每道题有倒计时X秒的思考时间。答题完成后领取本次的奖励积分。答题过程中如发现题目或答…

美图自研视觉大模型3.0发布

美图公司在举办的15周年生日会上发布了自研AI视觉大模型Miracle Vision3.0版本。面世100天后&#xff0c;美图AI视觉大模型MiracleVision3.0将全面应用于美图旗下影像与设计产品&#xff0c;并将助力电商、广告、游戏、动漫、影视五大行业。 美图公司创始人、董事长兼首席执行官…

3.后来居上的栈

概述 目标&#xff1a; 栈存储结构与特点基于数组实现栈基于单链表实现栈刷题(有效的括号) 存储结构与特点 栈(Stack)并非指某种特定的数据结构&#xff0c;它是有着相同典型特征的一数据结构的统称&#xff0c;因为栈可以用数组实现&#xff0c;也可以用链表实现&#xff…

超详细的万字Git分支教程(保姆级别)

&#x1f497;推荐阅读文章&#x1f497; &#x1f338;JavaSE系列&#x1f338;&#x1f449;1️⃣《JavaSE系列教程》&#x1f33a;MySQL系列&#x1f33a;&#x1f449;2️⃣《MySQL系列教程》&#x1f340;JavaWeb系列&#x1f340;&#x1f449;3️⃣《JavaWeb系列教程》…

stable-diffusion的模型简介和下载使用

前言 我们下载完stable-diffusion-ui后还需要下载需要的大模型&#xff0c;才能进行AI绘画的操作。秋叶的stable-diffusion-ui整合包内&#xff0c;包含了anything-v5-PrtRE.safetensors和Stable Diffusion-V1.5-final-prune_v1.0.ckpt两个模型。 anything-v5-PrtRE.safetenso…

PowerShell系列(十三):PowerShell Cmdlet高级参数介绍(三)

目录 1、WarningAction参数 2、WarningVariable 出现警告后的变量 3、Whatif 假设参数 4、Confirm参数 今天给大家讲解PowerShell Cmdlet高级参数第三部分相关的知识&#xff0c;希望对大家学习PowerShell能有所帮助&#xff01; 1、WarningAction参数 通过单词含义&…