海思ss928部署手写数字识别模型

大致流程---------------------------------------------------------------------------------------------------------------------

模型转换----------------------------------------------------------------------------------------------------

1:准备MNIST的onnx模型---> https://kdocs.cn/l/ctULnY8mxXuE

github地址--> GitHub - warren-wzw/MNIST-pytorch

搭建好ATC的环境--> https://kdocs.cn/l/cjeQxGjfojsX

首先设置环境变量

source /home/warren/Ascend/ascend-toolkit/latest/x86_64-linux/bin/setenv.bash

转化模型

atc --model=/home/warren/Ascend/yolov5/model/yolov5s.onnx \

--soc_version=OPTG  --framework=5 \

--output=/home/warren/Ascend/yolov5/model/yolov5s \

--input_shape="input0:1,2,64,64"  

atc --model=/home/warren/ss928/NNN_PC/amct/amct_onnx/sample/MNIST/outputs/calibration/MNIST_deploy_model.onnx \

> --soc_version=OPTG  --framework=5 \

> --output=/home/warren/ss928/NNN_PC/amct/amct_onnx/sample/MNIST/outputs/calibration/MNIST \

> --input_shape="input0:1,3,640,640"

模型转化成功后得到以下文件

        

模型量化--------------------------------------------------------------------------------------------------------------

目录结构

import os
import argparse
import cv2
import numpy as np
import onnxruntime as ort
import time
import torchimport amct_onnx as amctPATH = os.path.realpath('./')
DATA_DIR = os.path.join(PATH, 'data')
PARSER = argparse.ArgumentParser(description='amct_onnx MNIST quantization sample.')
ARGS = PARSER.parse_args()
OUTPUTS = os.path.join(PATH, 'outputs/calibration')
TMP = os.path.join(OUTPUTS, 'tmp')def onnx_forward(onnx_model, batch_size=1, iterations=100):ort_session = ort.InferenceSession(onnx_model, amct.AMCT_SO)with open("./data/train-images-idx3-ubyte","rb") as f:file = f.read()num = -1j=0inference_time =[0]for j in range(100):num=num+1i = 16+784*numimage1 = [int(str(item).encode('ascii'),16) for item in file[i:i+784]]input_data = np.array(image1,dtype=np.float32).reshape(1,1,28,28)#np.set_printoptions(linewidth=150)#print(input_data)input_name = ort_session.get_inputs()[0].name# inferencestart_time = time.time()output = ort_session.run(None, {input_name: input_data})end_time = time.time()inference_time.append(end_time - start_time)# 处理输出结果output = torch.tensor(output[0])  # 将输出转换为 PyTorch 张量#print(output_tensor)# 输出结果处理和后续操作...pred =np.argmax(output)print("------------------------The num of this pic is ",pred,"use time ",inference_time[num]*1000,"ms",j)def main():model_file = './model/model.onnx'print('[INFO] Do original model test:')onnx_forward(model_file,1,1)config_json_file = os.path.join(TMP, 'config.json')skip_layers = []amct.create_quant_config(config_file=config_json_file, model_file=model_file, skip_layers=skip_layers, batch_num=1,activation_offset=True, config_defination=None)# Phase1: do conv+bn fusion, weights calibration and generate#         calibration modelscale_offset_record_file = os.path.join(TMP, 'record.txt')modified_model = os.path.join(TMP, 'modified_model.onnx')amct.quantize_model(config_file=config_json_file, model_file=model_file, modified_onnx_file=modified_model,record_file=scale_offset_record_file)onnx_forward(modified_model, 32, 1)# Phase3: save final model, one for onnx do fake quant test, one#         deploy model for ATCresult_path = os.path.join(OUTPUTS, 'MNIST')amct.save_model(modified_model, scale_offset_record_file, result_path)# Phase4: run fake_quant model testprint('[INFO] Do quantized model test:')onnx_forward('%s_%s' % (result_path, 'fake_quant_model.onnx'), 1, 1)
if __name__ == '__main__':main()

推理代码编写---------------------------------------------------------------------------------------------------

将官方的sample复制一份改为MNIST,目录结构如下图所示

更改camke文件

1:添加环境变量:

export DDK_PATH=$HOME/Ascend/ascend-toolkit/latest

export NPU_HOST_LIB=$DDK_PATH/runtime/lib64/stub

2:创建build目录

mkdir -p build/intermediates/host

3:cmake ../../../src -DCMAKE_CXX_COMPILER=aarch64-mix210-linux-g++ -DCMAKE_SKIP_RPATH=TRUE

将整个MNIST文件夹拷贝至板端,添加库文件路径的环境变量

export ASCEND_GLOBAL_EVENT_ENABLE=0

export ASCEND_AACPU_KERNEL_PATH=/opt/sd/lib

export ASCEND_AICPU_KERNEL_PATH=/opt/sd/lib

export LD_LIBRARY_PATH=/opt/sd/lib

执行可执行文件main

执行成功。

代码讲解-------------------------------------------------------------------------

大致逻辑

 

main.cpp

#include "main.h"
#include "acl/acl.h"#define INFO_LOG(fmt, ...)  fprintf(stdout, "[INFO]  " fmt "\n", ##__VA_ARGS__)
#define WARN_LOG(fmt, ...)  fprintf(stdout, "[WARN]  " fmt "\n", ##__VA_ARGS__)
#define ERROR_LOG(fmt, ...) fprintf(stderr, "[ERROR]  " fmt "\n", ##__VA_ARGS__)
const int MODEL_CHANNEL = 1;
const int MODEL_IN_WIDTH = 28;
const int MODEL_IN_HEIGHT = 28;
const int loop_count = 1000;typedef enum Result {SUCCESS = 0,FAILED = 1
} Result;static inline int64_t getCurrentTimeUs()
{struct timeval tv;gettimeofday(&tv, NULL);return tv.tv_sec * 1000000 + tv.tv_usec;
}
void Load_data(int num,unsigned char * input_image)
{int j=16+784*num;FILE *file = fopen("../data/train-images-idx3-ubyte", "rb");if (file == NULL) {printf("can't open the file!\n");}fseek(file,j,SEEK_SET);fread(input_image,sizeof(char),784,file);//print
/*     for(int i=0;i<MODEL_IN_WIDTH;i++){for(int j=0;j<MODEL_IN_WIDTH;j++){printf("%4d",input_image[i*28+j]);}printf("\n");}  */fclose(file);
}
void Bubble_sort(float *buffer,int num)
{float temp;for(int i=0; i<num;i++){for(int j=0; j<num-i-1;j++){if(buffer[j]>buffer[j+1]){temp = buffer[j];buffer[j]=buffer[j+1];buffer[j+1]=temp;}}}
}
int main()
{
/***************************************************/
/*****************define var************************/
/***************************************************/int num=0;aclError ret=1;const char *aclConfigPath = "../src/acl.json";int32_t deviceId_=0;aclrtContext context_=nullptr;aclrtStream stream_=nullptr;aclrtRunMode runMode;uint32_t modelId_=0;const char* modelPath = "../model/MNIST.om";aclmdlDesc *modelDesc_;aclmdlDataset *output_;aclmdlDataset *input_;void * inputDataBuffer = nullptr;size_t size = 784;void* input_image_original;void* time_ori;int64_t sum=0;int64_t start_time=0;int64_t end_time=0;
/***************************************************/
/*****************Init ACL**************************/
/***************************************************/ret = aclInit(aclConfigPath);if (ret != ACL_SUCCESS) {ERROR_LOG("acl init failed, errorCode = %d", static_cast<int32_t>(ret));return FAILED;}INFO_LOG("--------------------acl init success");
/***************************************************/
/*****************apply resource********************/
/***************************************************/// set device only one device    ret = aclrtSetDevice(deviceId_);if (ret != ACL_SUCCESS) {ERROR_LOG("acl set device %d failed, errorCode = %d", deviceId_, static_cast<int32_t>(ret));return FAILED;}INFO_LOG("set device %d success", deviceId_);// create context (set current)ret = aclrtCreateContext(&context_, deviceId_);if (ret != ACL_SUCCESS) {ERROR_LOG("acl create context failed, deviceId = %d, errorCode = %d",deviceId_, static_cast<int32_t>(ret));return FAILED;}INFO_LOG("create context success");// create streamret = aclrtCreateStream(&stream_);if (ret != ACL_SUCCESS) {ERROR_LOG("acl create stream failed, deviceId = %d, errorCode = %d",deviceId_, static_cast<int32_t>(ret));return FAILED;}INFO_LOG("create stream success");// get run moderet = aclrtGetRunMode(&runMode);if (ret != ACL_SUCCESS) {ERROR_LOG("acl get run mode failed, errorCode = %d", static_cast<int32_t>(ret));return FAILED;} 
/***************************************************/
/********load model and get infos of model**********/
/***************************************************/ret = aclmdlLoadFromFile(modelPath,&modelId_);if (ret != ACL_SUCCESS) {ERROR_LOG("load model from file failed, model file is %s, errorCode is %d",modelPath, static_cast<int32_t>(ret));return FAILED;}INFO_LOG("load model %s success id is %d\n", modelPath,modelId_);//get model describemodelDesc_ = aclmdlCreateDesc();if (modelDesc_ == nullptr) {ERROR_LOG("create model description failed");return FAILED;}ret = aclmdlGetDesc(modelDesc_, modelId_);if (ret != ACL_SUCCESS) {ERROR_LOG("get model description failed, modelId is %u, errorCode is %d",modelId_, static_cast<int32_t>(ret));return FAILED;}INFO_LOG("create model description success");
/***************************************************/
/******************print input tensor***************/
/***************************************************/     
/*     aclmdlIODims *dim;ret=aclmdlGetInputDims(modelDesc_,0,dim);printf("----------------in dims is %d \n",dim->dimCount);printf("----------------in dims name is: %s dims: \n",dim->name);for(int num=0;num<dim->dimCount;num++){printf("%d ",num,dim->dims[num]);}ret = aclmdlGetOutputDims(modelDesc_,0,dim);printf("----------------out dims is %d \n",dim->dimCount);printf("----------------out dims name is: %s dims:\n",dim->name);for(int num=0;num<dim->dimCount;num++){printf("%d \n",num,dim->dims[num]);} deviceId_=0;*/
/***************************************************/
/******************prepare output data buffer***************/
/***************************************************/output_ = aclmdlCreateDataset();if (output_ == nullptr) {ERROR_LOG("can't create dataset, create output failed");return FAILED;}size_t outputSize = aclmdlGetNumOutputs(modelDesc_); for (size_t i = 0; i < outputSize; ++i) {size_t modelOutputSize = aclmdlGetOutputSizeByIndex(modelDesc_, i);void *outputBuffer = nullptr;ret = aclrtMalloc(&outputBuffer, modelOutputSize, ACL_MEM_MALLOC_NORMAL_ONLY);if (ret != ACL_SUCCESS) {ERROR_LOG("can't malloc buffer, size is %zu, create output failed, errorCode is %d",modelOutputSize, static_cast<int32_t>(ret));return FAILED;}//apply output bufferaclDataBuffer *outputData = aclCreateDataBuffer(outputBuffer, modelOutputSize);if (outputData == nullptr) {ERROR_LOG("can't create data buffer, create output failed");(void)aclrtFree(outputBuffer);return FAILED;}ret = aclmdlAddDatasetBuffer(output_, outputData);if (ret != ACL_SUCCESS) {ERROR_LOG("can't add data buffer, create output failed, errorCode is %d",static_cast<int32_t>(ret));(void)aclrtFree(outputBuffer);(void)aclDestroyDataBuffer(outputData);return FAILED;}}INFO_LOG("create model output success");
/***************************************************/
/******************prepare input data***************/
/***************************************************/    if (modelDesc_ == nullptr) {ERROR_LOG("no model description, create input failed");return FAILED;}input_ = aclmdlCreateDataset();if (input_ == nullptr) {ERROR_LOG("can't create dataset, create input failed");return FAILED;}size_t modelInputSize = aclmdlGetInputSizeByIndex(modelDesc_, 0);ret = aclrtMalloc(&input_image_original, 784, ACL_MEM_MALLOC_NORMAL_ONLY);if (ret != ACL_SUCCESS) {ERROR_LOG("malloc device buffer failed. size is %zu, errorCode is %d",size, static_cast<int32_t>(ret));return FAILED;}unsigned char * input_image = static_cast<unsigned char*>(input_image_original);void* input_image_float_ori;ret = aclrtMalloc(&input_image_float_ori, 784*sizeof(float), ACL_MEM_MALLOC_NORMAL_ONLY);if (ret != ACL_SUCCESS) {ERROR_LOG("malloc device buffer failed. size is %zu, errorCode is %d",size, static_cast<int32_t>(ret));return FAILED;}float * input_image_float = static_cast<float*>(input_image_float_ori);;Load_data(num,input_image);for(int num=0;num<784;num++){input_image_float[num]=(float)input_image[num];}
/*     aclrtFree(input_image);input_image=nullptr; */aclDataBuffer *inputData = aclCreateDataBuffer(input_image_float, modelInputSize);if (inputData == nullptr) {ERROR_LOG("can't create data buffer, create input failed");return FAILED;}ret = aclmdlAddDatasetBuffer(input_, inputData);if (ret != ACL_SUCCESS) {ERROR_LOG("add input dataset buffer failed, errorCode is %d", static_cast<int32_t>(ret));(void)aclDestroyDataBuffer(inputData);inputData = nullptr;return FAILED;}INFO_LOG("create model input success");ret = aclrtMalloc(&time_ori, loop_count*sizeof(int64_t), ACL_MEM_MALLOC_NORMAL_ONLY);if (ret != ACL_SUCCESS) {ERROR_LOG("malloc device buffer failed. size is %zu, errorCode is %d",loop_count*sizeof(int64_t), static_cast<int32_t>(ret));return FAILED;}int64_t * time = static_cast<int64_t*>(time_ori);for(int loop_time=0;loop_time < loop_count;loop_time++){num++;Load_data(num,input_image);for(int loop_num=0;loop_num<784;loop_num++){input_image_float[loop_num]=(float)input_image[loop_num];}void* data = aclGetDataBufferAddr(inputData);uint32_t len = aclGetDataBufferSizeV2(inputData);     float *indata = NULL;  indata = reinterpret_cast<float*>(data);  /***************************************************//******************inference************************//***************************************************/start_time = getCurrentTimeUs();ret = aclmdlExecute(modelId_, input_, output_);end_time = getCurrentTimeUs();time[loop_time]=end_time-start_time;sum=sum+time[loop_time];printf("---Elapse Time = %.3f ms \n", (end_time-start_time) / 1000.f);   
/***************************************************/
/******************post process*********************/
/***************************************************/// get model output dataaclDataBuffer* dataBuffer = aclmdlGetDatasetBuffer(output_, 0);void* data_1 = aclGetDataBufferAddr(dataBuffer);uint32_t len_1 = aclGetDataBufferSizeV2(dataBuffer);     float *outData = NULL;  outData = reinterpret_cast<float*>(data_1);  void* buffer_copy_ori;ret = aclrtMalloc(&buffer_copy_ori, len_1*sizeof(float), ACL_MEM_MALLOC_NORMAL_ONLY);if (ret != ACL_SUCCESS) {ERROR_LOG("malloc device buffer failed. size is %zu, errorCode is %d",len_1, static_cast<int32_t>(ret));return FAILED;}float * buffer_copy = static_cast<float*>(buffer_copy_ori);for(int i_1 = 0; i_1 < len_1/sizeof(*outData);i_1++){buffer_copy[i_1]=outData[i_1];}Bubble_sort(outData,len_1/sizeof(*outData));for(int i_2 =0;i_2<len_1/sizeof(*outData);i_2++){if(buffer_copy[i_2]==outData[9]){printf("------------------------------------------%d time the pic value is %d \n",loop_time,i_2);}} aclrtFree(buffer_copy);buffer_copy=nullptr;}printf("--------loop %d times sum is %.4f ms average time is %.3f ms\n", loop_count,sum / 1000.f,(sum / 1000.f)/loop_count);aclrtFree(time);time=nullptr;aclrtFree(input_image);input_image=nullptr;aclrtFree(input_image_float);input_image_float=nullptr;/***************************************************/
/*******************destroy model input*************/
/***************************************************/for(size_t i = 0; i < aclmdlGetDatasetNumBuffers(input_); ++i) {aclDataBuffer *dataBuffer = aclmdlGetDatasetBuffer(input_, i);(void)aclDestroyDataBuffer(dataBuffer);}(void)aclmdlDestroyDataset(input_);input_ = nullptr;INFO_LOG("destroy model input success");
/***************************************************/
/*********************destroy model output*********/
/***************************************************/for (size_t i = 0; i < aclmdlGetDatasetNumBuffers(output_); ++i) {aclDataBuffer* dataBuffer = aclmdlGetDatasetBuffer(output_, i);void* data = aclGetDataBufferAddr(dataBuffer);(void)aclrtFree(data);(void)aclDestroyDataBuffer(dataBuffer);}(void)aclmdlDestroyDataset(output_);output_ = nullptr;INFO_LOG("destroy model output success");
/***************************************************/
/******uninstall model and release resource*********/
/***************************************************/modelId_=1;ret = aclmdlUnload(modelId_);// releasemodelDesc_if (modelDesc_ != nullptr) {aclmdlDestroyDesc(modelDesc_);modelDesc_ = nullptr;}INFO_LOG("unload model success, modelId is %u", modelId_);// release resorceif (stream_ != nullptr) {ret = aclrtDestroyStream(stream_);if (ret != ACL_SUCCESS) {ERROR_LOG("destroy stream failed, errorCode = %d", static_cast<int32_t>(ret));}stream_ = nullptr;}INFO_LOG("end to destroy stream");if (context_ != nullptr) {ret = aclrtDestroyContext(context_);if (ret != ACL_SUCCESS) {ERROR_LOG("destroy context failed, errorCode = %d", static_cast<int32_t>(ret));}context_ = nullptr;}INFO_LOG("end to destroy context");ret = aclrtResetDevice(deviceId_);if (ret != ACL_SUCCESS) {ERROR_LOG("reset device %d failed, errorCode = %d", deviceId_, static_cast<int32_t>(ret));}INFO_LOG("end to reset device %d", deviceId_);ret = aclFinalize();if (ret != ACL_SUCCESS) {ERROR_LOG("finalize acl failed, errorCode = %d", static_cast<int32_t>(ret));}INFO_LOG("end to finalize acl");
}

 

执行结果:

fp32

int8

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

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

相关文章

【EI复现】考虑区域多能源系统集群协同优化的联合需求侧响应模型(Matlab代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…

https的原理和方案

文章目录 https原理为什么要加密常见的加密方式对称加密非对称加密数据摘要&&数据指纹数据签名 https的几种工作方案方案一&#xff1a;只使用对称加密方案二&#xff1a;只使用非对称加密方案三&#xff1a;两端都使用非对称加密方案四&#xff1a;非对称加密 对称加…

CSS前端开发指南:创造精美的用户界面

简介&#xff1a; 《CSS前端开发指南&#xff1a;创造精美的用户界面》是一本旨在帮助读者掌握CSS技术&#xff0c;实现令人惊叹的前端用户界面的实用指南。无论您是初学者还是有经验的开发者&#xff0c;本书都将为您提供全面的知识和实用技巧&#xff0c;帮助您创建引人注目…

c语言每日一练(5)

前言&#xff1a;每日一练系列&#xff0c;每一期都包含5道选择题&#xff0c;2道编程题&#xff0c;博主会尽可能详细地进行讲解&#xff0c;令初学者也能听的清晰。每日一练系列会持续更新&#xff0c;暑假时三天之内必有一更&#xff0c;到了开学之后&#xff0c;将看学业情…

什么是设计模式?

目录 概述: 什么是模式&#xff01;&#xff01; 为什么学习模式&#xff01;&#xff01; 模式和框架的比较&#xff1a; 设计模式研究的历史 关于pattern的历史 Gang of Four(GoF) 关于”Design”Pattern” 重提&#xff1a;指导模式设计的三个概念 1.重用(reuse)…

opencv基础48-绘制图像轮廓并切割示例-cv2.drawContours()

绘制图像轮廓&#xff1a;drawContours函数 在 OpenCV 中&#xff0c;可以使用函数 cv2.drawContours()绘制图像轮廓。该函数的语法格式是&#xff1a; imagecv2.drawContours( image, contours, contourIdx, color[, thickness[, lineType[, hierarchy[, maxLevel[, offset]]…

c基础扫雷

和三子棋一样&#xff0c;主函数先设计游戏菜单界面&#xff0c;这里就不做展示了。 初始化棋盘 初级扫雷大小为9*9的棋盘&#xff0c;但排雷是周围一圈进行排雷(8格)&#xff0c;而边界可能会越界。数组扩大了一圈,行和列都加了2&#xff0c;所以我们用一个11*11的数组来初始化…

UDS诊断笔记

文章目录 常见缩写简介UDS寻址模式1. 物理寻址&#xff08;点对点、一对一&#xff09;2. 功能寻址&#xff08;广播、一对多&#xff09;3. 功能寻址使用场景举例 UDS报文格式UDS协议栈网络层网络层功能网络层协议1. 单帧 SF&#xff08;Single Frame&#xff09;2. 首帧 FC&a…

教你一招:非计算机科班如何丝滑转码?

近年来&#xff0c;很多人想要从其他行业跳槽转入计算机领域。非计算机科班如何丝滑转码&#xff1f; 目录 一、确定方向 二、确定学习计划&#xff08;自学&#xff09; 三、学习 看到组里好多非科班姐妹决定转码之后&#xff0c;因为相关背景知识不足难以确定学习计划&am…

【机密计算-大厂有话说】微软 Open Enclave SDK

前言 机密计算是基于硬件支持的可信执行环境的&#xff0c;比如 Intel SGX 硬件技术上面的 enclave 以及 Arm Trustzone 上的 OT-TEE&#xff0c;不过这些异构的 TEE 之间差异还是蛮大的&#xff0c;所以亟需一种能够屏蔽 TEE 差异软件中间件或者 SDK&#xff0c;这就是本文将要…

生成测试报告,在Unittest框架中就是简单

测试套件&#xff08;Test Suite&#xff09;是测试用例、测试套件或两者的集合&#xff0c;用于组装一组要运行的测试&#xff08;多个测试用例集合在一起&#xff09;。 &#xff08;1&#xff09;创建一个测试套件&#xff1a; import unittest suite unittest.TestSuite…

面向开发人员的 Spring Boot 最佳实践

Spring Boot是一种广泛使用且非常流行的企业级高性能框架。以下是一些最佳实践和一些技巧&#xff0c;您可以使用它们来改进 Spring Boot 应用程序并使其更加高效。这篇文章会有点长&#xff0c;完整读完文章需要一些时间。 正确的包装风格 正确的打包将有助于轻松理解代码和…

【VUE】项目本地开启https访问模式(vite4)

在实际开发中&#xff0c;有时候需要项目以https形式进行页面访问/调试&#xff0c;下面介绍下非vue-cli创建的vue项目如何开启https 环境 vue: ^3.2.47vite: ^4.1.4 根据官方文档&#xff1a;开发服务器选项 | Vite 官方中文文档 ps&#xff1a;首次操作&#xff0c;不要被类…

Pyspark

2、DataFrame 2.1 介绍 在Spark语义中&#xff0c;DataFrame是一个分布式的行集合&#xff0c;可以想象为一个关系型数据库的表&#xff0c;或者一个带有列名的Excel表格。它和RDD一样&#xff0c;有这样一些特点&#xff1a; Immuatable&#xff1a;一旦RDD、DataFrame被创…

ssm+vue基于java的少儿编程网上报名系统源码和论文PPT

ssmvue基于java的少儿编程网上报名系统源码和论文PPT006 开发工具&#xff1a;idea 数据库mysql5.7(mysql5.7最佳) 数据库链接工具&#xff1a;navcat,小海豚等 开发技术&#xff1a;java ssm tomcat8.5 摘 要 在国家重视教育影响下&#xff0c;教育部门的密确配合下&#…

沐渥六门氮气柜技术参数详解

氮气柜是用来存储电子元器件、芯片、半导体器件、金属材料、电路板、精密仪器等物品的设备&#xff0c;通过充入氮气降低柜内湿度&#xff0c;达到防潮、防氧化、防静电、防锈和防霉效果。 六门氮气柜参数 1、容积&#xff1a;约1380L&#xff1b;外尺寸&#xff1a;W1200*D700…

100G光模块的应用案例分析:电信、云计算和大数据领域

100G光模块是一种高速光模块&#xff0c;由于其高速率和低延迟的特性&#xff0c;在电信、云计算和大数据领域得到了广泛的应用。在本文中&#xff0c;我们将深入探讨100G光模块在这三个领域的应用案例。 一、电信领域 在电信领域&#xff0c;100G光模块被广泛用于构建高速通…

Nginx使用proxy_cache指令设置反向代理缓存静态资源

场景 CentOS7中解压tar包的方式安装Nginx&#xff1a; CentOS7中解压tar包的方式安装Nginx_centos7 tar文件 怎么load_霸道流氓气质的博客-CSDN博客 参考上面流程实现搭建Nginx的基础上&#xff0c;实现静态资源的缓存设置。 注意上面安装时的目录是在/opt/nginx目录下&…

ELK中grok插件、mutate插件、multiline插件、date插件的相关配置

目录 一、grok 正则捕获插件 自定义表达式调用 二、mutate 数据修改插件 示例&#xff1a; ●将字段old_field重命名为new_field ●添加字段 ●将字段删除 ●将filedName1字段数据类型转换成string类型&#xff0c;filedName2字段数据类型转换成float类型 ●将filedNam…