当前位置: 首页 > news >正文

提高大型语言模型 (LLM) 性能的四种数据清理技术

原文地址:four-data-cleaning-techniques-to-improve-large-language-model-llm-performance

2024 年 4 月 2 日 

检索增强生成(RAG)过程因其增强对大语言模型(LLM)的理解、为它们提供上下文并帮助防止幻觉的潜力而受到欢迎。 RAG 过程涉及几个步骤,从分块摄取文档到提取上下文,再到用该上下文提示 LLM 模型。虽然 RAG 可以显着改善预测,但有时也会导致错误的结果。摄取文档的方式在此过程中起着至关重要的作用。例如,如果我们的“上下文文档”包含LLM的拼写错误或不寻常的字符(例如表情符号),则可能会混淆LLM对所提供上下文的理解。

在这篇文章中,我们将演示如何使用四种常见的自然语言处理 (NLP)技术来清理文本,然后再将文本摄取并转换为块以供LLM进一步处理。我们还将说明这些技术如何显着增强模型对提示的响应。

RAG 过程的步骤改编自RAG-Survey。

为什么清理文档很重要?

在将文本输入任何类型的机器学习算法之前清理文本是标准做法。无论您使用的是监督算法还是无监督算法,甚至是为生成 AI (GAI) 模型构建上下文,使文本保持良好状态都有助于:

确保准确性:通过消除错误并使一切保持一致,您就不太可能混淆模型或最终出现模型幻觉。

提高质量:更清晰的数据确保模型能够使用可靠且一致的信息,帮助我们的模型从准确的数据中进行推断。

促进分析:干净的数据易于解释和分析。例如,使用纯文本训练的模型可能难以理解表格数据。

通过清理我们的数据(尤其是非结构化数据),我们为模型提供了可靠且相关的上下文,从而改进了生成,降低了幻觉的可能性,并提高了 GAI 速度和性能,因为大量信息会导致更长的等待时间。

如何实现数据清洗?

为了帮助您构建数据清理工具箱,我们将探讨四种 NLP 技术以及它们如何帮助模型。

步骤1:数据清洗和降噪

我们将首先删除不提供含义的符号或字符,例如 HTML 标签(在抓取的情况下)、XML 解析、JSON、表情符号和主题标签。不必要的字符通常会混淆模型,并增加上下文标记的数量,从而增加计算成本。

认识到没有一刀切的解决方案,我们将使用常见的清理技术来调整我们的方法以适应不同的问题和文本类型:

标记化:将文本分割成单独的单词或标记。

消除噪音:消除不需要的符号、表情符号、主题标签和 Unicode 字符。

规范化:将文本转换为小写以保持一致性。

删除停用词:丢弃不会增加含义的常见或重复的单词,例如“a”、“in”、“of”和“the”。

词形还原或词干提取:将单词简化为其基本形式或词根形式。

我们以这条推文为例:

I love coding! 😊 #PythonProgramming is fun! 🐍✨ Let’s clean some text 🧹

虽然我们很清楚其含义,但让我们通过应用 Python 中的常用技术来简化模型。以下代码片段和本文中的所有其他代码片段都是在 ChatGPT 的帮助下生成的。

import re
import nltk
from nltk.tokenize import word_tokenize
from nltk.corpus import stopword
s
from nltk.stem import WordNetLemmatizer# Sample text with emojis, hashtags, and other characters
text = “I love coding! 😊 #PythonProgramming is fun! 🐍✨ Let’s clean some text 🧹”# Tokenization
tokens = word_tokenize(text)# Remove Noise
cleaned_tokens = [re.sub(r’[^\w\s]’, ‘’, token) for token in tokens]# Normalization (convert to lowercase)
cleaned_tokens = [token.lower() for token in cleaned_tokens]# Remove Stopwords
stop_words = set(stopwords.words(‘english’))
cleaned_tokens = [token for token in cleaned_tokens if token not in stop_words]# Lemmatization
lemmatizer = WordNetLemmatizer()
cleaned_tokens = [lemmatizer.lemmatize(token) for token in cleaned_tokens]print(cleaned_tokens)# output:
# [‘love’, ‘coding’, ‘pythonprogramming’, ‘fun’, ‘clean’, ‘text’]

该过程删除了不相关的字符,并为我们留下了我们的模型可以理解的干净且有意义的文本:['love', 'coding', 'pythonprogramming', 'fun', 'clean', 'text']。

步骤2:文本标准化和规范化

接下来,我们应该始终优先考虑文本的一致性和连贯性。这对于确保准确的检索和生成至关重要。在下面的 Python 示例中,让我们扫描文本输入是否存在拼写错误和其他可能导致不准确和性能下降的不一致之处。

import re# Sample text with spelling errors
text_with_errors = “””But ’s not  oherence  about more language  oherence . 
Other important aspect is ensuring accurte retrievel by  oherence  product name spellings. 
Additionally, refning descriptions  oherenc the  oherence of the contnt.”””# Function to correct spelling errors
def correct_spelling_errors(text):# Define dictionary of common spelling mistakes and their correctionsspelling_corrections = {“ oherence ”: “everything”,“ oherence ”: “refinement”,“accurte”: “accurate”,“retrievel”: “retrieval”,“ oherence ”: “correcting”,“refning”: “refining”,“ oherenc”: “enhances”,“ oherence”: “coherence”,“contnt”: “content”,}# Iterate over each key-value pair in the dictionary and replace the# misspelled words with their correct versionsfor mistake, correction in spelling_corrections.items():text = re.sub(mistake, correction, text)return text# Correct spelling errors in the sample text
cleaned_text = correct_spelling_errors(text_with_errors)print(cleaned_text)
# output
# But it’s not everything about more language refinement.
# other important aspect is ensuring accurate retrieval by correcting product name spellings.
# Additionally, refining descriptions enhances the coherence of the content.

通过连贯一致的文本表示,我们的模型现在可以生成准确且上下文相关的响应。此过程还使语义搜索能够提取最佳上下文块,特别是在 RAG 上下文中。

步骤3:元数据处理

元数据收集,例如识别重要的关键字和实体,使我们可以轻松识别文本中的元素,我们可以使用这些元素来改进语义搜索结果,特别是在内容推荐系统等企业应用程序中。此过程为模型提供了额外的上下文,通常需要提高 RAG 性能。让我们将此步骤应用到另一个 Python 示例中。

Import spacy
import json# Load English language model
nlp = spacy.load(“en_core_web_sm”)# Sample text with meta data candidates
text = “””In a blog post titled ‘The Top 10 Tech Trends of 2024,’ 
John Doe discusses the rise of artificial intelligence and machine learning 
in various industries. The article mentions companies like Google and Microsoft 
as pioneers in AI research. Additionally, it highlights emerging technologies 
such as natural language processing and computer vision.”””# Process the text with spaCy
doc = nlp(text)# Extract named entities and their labels
meta_data = [{“text”: ent.text, “label”: ent.label_} for ent in doc.ents]# Convert meta data to JSON format
meta_data_json = json.dumps(meta_data)print(meta_data_json)# output
“””
[{“text”: “2024”, “label”: “DATE”},{“text”: “John Doe”, “label”: “PERSON”},{“text”: “Google”, “label”: “ORG”},{“text”: “Microsoft”, “label”: “ORG”},{“text”: “AI”, “label”: “ORG”},{“text”: “natural language processing”, “label”: “ORG”},{“text”: “computer vision”, “label”: “ORG”}
]
“””

该代码强调了spaCy 的 实体识别功能如何识别文本中的日期、人员、组织以及其他重要实体。这有助于 RAG 应用程序更好地理解上下文和单词之间的关系。

步骤4:上下文信息处理

在与LLM合作时,您通常可能会使用多种语言或管理充满各种主题的大量文档,这对于您的模型来说很难理解。让我们看一下两种可以帮助您的模型更好地理解数据的技术。

让我们从语言翻译开始。使用Google Translation API,代码翻译原文“Hello, how are you?”从英语到西班牙语。

From googletrans import Translator# Original text
text = “Hello, how are you?”# Translate text
translator = Translator()
translated_text = translator.translate(text, src=’en’, dest=’es’).textprint(“Original Text:”, text)
print(“Translated Text:”, translated_text)

主题建模包括数据聚类等技术,就像将凌乱的房间整理成整齐的类别一样,帮助您的模型识别文档的主题并快速对大量信息进行排序。潜在狄利克雷分配 (LDA)是用于自动化主题建模过程的最流行的技术,是一种统计模型,可通过仔细观察单词模式来帮助找到文本中隐藏的主题。

在下面的示例中,我们将使用sklearn处理一组文档并识别关键主题。

from sklearn.feature_extraction.text import CountVectorizer
from sklearn.decomposition import LatentDirichletAllocation# Sample documents
documents = ["Machine learning is a subset of artificial intelligence.","Natural language processing involves analyzing and understanding human languages.","Deep learning algorithms mimic the structure and function of the human brain.","Sentiment analysis aims to determine the emotional tone of a text."
]# Convert text into numerical feature vectors
vectorizer = CountVectorizer(stop_words='english')
X = vectorizer.fit_transform(documents)# Apply Latent Dirichlet Allocation (LDA) for topic modeling
lda = LatentDirichletAllocation(n_components=2, random_state=42)
lda.fit(X)# Display topics
for topic_idx, topic in enumerate(lda.components_):print("Topic %d:" % (topic_idx + 1))print(" ".join([vectorizer.get_feature_names()[i] for i in topic.argsort()[:-5 - 1:-1]]))# output
#
#Topic 1:
#learning machine subset artificial intelligence
#Topic 2:
#processing natural language involves analyzing understanding

如果您想探索更多主题建模技术,我们建议从以下开始:

非负矩阵分解 (NMF)非常适合负值没有意义的图像等情况。当您需要清晰、可理解的因素时,它会很方便。例如,在图像处理中,NMF 有助于提取特征,而不会混淆负值。

当您拥有分布在多个文档中的大量文本并且想要查找单词和文档之间的联系时,潜在语义分析 (LSA)会发挥作用。 LSA 使用奇异值分解 (SVD)来识别术语和文档之间的语义关系,有助于简化任务,例如按相似性对文档进行排序和检测抄袭。

当您不确定文档中有多少数据时,分层狄利克雷过程 (HDP)可帮助您快速对海量数据进行排序并识别文档中的主题。作为LDA的扩展,HDP允许无限的主题和更大的建模灵活性。它识别文本数据中的层次结构,以完成理解学术论文或新闻文章中主题的组织等任务。

概率潜在语义分析 (PLSA)可帮助您确定文档与某些主题相关的可能性有多大,这在构建基于过去交互提供个性化推荐的推荐系统时非常有用。

演示:清理 GAI 文本输入

让我们通过一个例子将它们放在一起。在此演示中,我们使用 ChatGPT 在两位技术人员之间生成对话。我们将在对话中应用基本的清洁技术,以展示这些实践如何实现可靠且一致的结果。

synthetic_text = """
Sarah (S): Technology Enthusiast
Mark (M): AI Expert
S: Hey Mark! How's it going? Heard about the latest advancements in Generative AI (GA)?
M: Hey Sarah! Yes, I've been diving deep into the realm of GA lately. It's fascinating how it's shaping the future of technology!
S: Absolutely! I mean, GA has been making waves across various industries. What do you think is driving its significance?
M: Well, GA, especially Retrieval Augmented Generative (RAG), is revolutionizing content generation. It's not just about regurgitating information anymore; it's about creating contextually relevant and engaging content.
S: Right! And with Machine Learning (ML) becoming more sophisticated, the possibilities seem endless.
M: Exactly! With advancements in ML algorithms like GPT (Generative Pre-trained Transformer), we're seeing unprecedented levels of creativity in AI-generated content.
S: But what about concerns regarding bias and ethics in GA?
M: Ah, the age-old question! While it's true that GA can inadvertently perpetuate biases present in the training data, there are techniques like Adversarial Training (AT) that aim to mitigate such issues.
S: Interesting! So, where do you see GA headed in the next few years?
M: Well, I believe we'll witness a surge in applications leveraging GA for personalized experiences. From virtual assistants to content creation tools, GA will become ubiquitous in our daily lives.
S: That's exciting! Imagine AI-powered virtual companions tailored to our preferences.
M: Indeed! And with advancements in Natural Language Processing (NLP) and computer vision, these virtual companions will be more intuitive and lifelike than ever before.
S: I can't wait to see what the future holds!
M: Agreed! It's an exciting time to be in the field of AI.
S: Absolutely! Thanks for sharing your insights, Mark.
M: Anytime, Sarah. Let's keep pushing the boundaries of Generative AI together!
S: Definitely! Catch you later, Mark!
M: Take care, Sarah!
"""

第 1 步:基本清理

首先,我们从对话中删除表情符号、主题标签和 Unicode 字符。

# Sample text with emojis, hashtags, and unicode characters# Tokenization
tokens = word_tokenize(synthetic_text)# Remove Noise
cleaned_tokens = [re.sub(r'[^\w\s]', '', token) for token in tokens]# Normalization (convert to lowercase)
cleaned_tokens = [token.lower() for token in cleaned_tokens]# Remove Stopwords
stop_words = set(stopwords.words('english'))
cleaned_tokens = [token for token in cleaned_tokens if token not in stop_words]# Lemmatization
lemmatizer = WordNetLemmatizer()
cleaned_tokens = [lemmatizer.lemmatize(token) for token in cleaned_tokens]print(cleaned_tokens)

第 2 步:准备我们的提示

接下来,我们将制作一个提示,要求模型根据从我们的综合对话中收集的信息作为友好的客户服务代理进行响应。

MESSAGE_SYSTEM_CONTENT = "You are a customer service agent that helps 
a customer with answering questions. Please answer the question based on the
provided context below. 
Make sure not to make any changes to the context if possible,
when prepare answers so as to provide accurate responses. If the answer 
cannot be found in context, just politely say that you do not know, 
do not try to make up an answer."

第 3 步:准备交互

让我们准备与模型的交互。在此示例中,我们将使用 GPT-4。

def response_test(question:str, context:str, model:str = "gpt-4"):response = client.chat.completions.create(model=model,messages=[{"role": "system","content": MESSAGE_SYSTEM_CONTENT,},{"role": "user", "content": question},{"role": "assistant", "content": context},],)return response.choices[0].message.content

第 4 步:准备问题

最后,让我们向模型提出一个问题,并比较清洁前后的结果。

question1 = "What are some specific techniques in Adversarial Training (AT) 
that can help mitigate biases in Generative AI models?"

在清洁之前,我们的模型会生成以下响应:

response = response_test(question1, synthetic_text)
print(response)#Output
# I'm sorry, but the context provided doesn't contain specific techniques in Adversarial Training (AT) that can help mitigate biases in Generative AI models.

清理后,模型会生成以下响应。通过基本清洁技术增强理解,该模型可以提供更彻底的答案。

response = response_test(question1, new_content_string)
print(response)
#Output:
# The context mentions Adversarial Training (AT) as a technique that can 
# help mitigate biases in Generative AI models. However, it does not provide 
#any specific techniques within Adversarial Training itself.

人工智能成果的光明未来

RAG 模型具有多种优势,包括通过提供相关上下文来增强人工智能生成结果的可靠性和一致性。这种情境化显着提高了人工智能生成内容的准确性。

为了充分利用 RAG 模型,在文档摄取过程中强大的数据清理技术至关重要。这些技术解决了文本数据中的差异、不精确的术语和其他潜在错误,显着提高了输入数据的质量。当使用更干净、更可靠的数据进行操作时,RAG 模型可提供更准确、更有意义的结果,使 AI 用例能够在跨领域提供更好的决策和解决问题的能力。

相关文章:

提高大型语言模型 (LLM) 性能的四种数据清理技术

原文地址:four-data-cleaning-techniques-to-improve-large-language-model-llm-performance 2024 年 4 月 2 日 检索增强生成(RAG)过程因其增强对大语言模型(LLM)的理解、为它们提供上下文并帮助防止幻觉的潜力而受…...

Rust 练手小项目:猜数游戏

好久没写 Rust 了,参考《Rust 程序设计语言》写了一下猜数游戏。差不多 40 行,感觉写起来真舒服。 use rand::Rng; use std::{cmp::Ordering, io};fn main() {let secret_number rand::thread_rng().gen_range(0..100);println!("[*] Guess the n…...

蓝桥杯物联网竞赛_STM32L071_16_EEPROM

仍然是没有考过的知识点 朴素的讲就是板子中一块不会因为断电重启而导致数值初始化的一片地址 要注意的是有时候容易把板子什么写错导致板子什么地址写坏了导致程序无法烧录,这个时候记得一直按flash键烧录,烧录时会报错,点击确定&#xff0…...

复习知识点整理

零碎语法 1.导入某个文件夹的index文件,index可以省略(这里导入的是router和store文件下的index.js文件) 2.路由懒加载 this 1.在vue文件中使用router\store对象时 this:普通函数的this指向vue实例对象(在没有明确指向的时候…...

7款公司电脑监控软件

7款公司电脑监控软件 研究证明,人们在家办公的效率比在办公室办公的效率低一半,其中原因是缺少监督,即便在公司办公,还存在员工偷闲的时刻,比如聊天、浏览无关网站、看剧、炒股等,企业想提高员工的工作效率…...

服务器 安装1Panel服务器运维管理面板

服务器 安装1Panel服务器运维管理面板 SSH链接服务器安装1Panel 出现此提示时输入目标路径,须以“/”开头,默认:/opt,本例:/www。 出现此提示时输入目标端口,须未被使用的端口,默认&#xff1…...

最大花之能量(蓝桥杯)

文章目录 最大花之能量问题描述动态规划 最大花之能量 问题描述 在一个神奇的王国里,有一个美丽的花园,里面生长着各种奇妙的花朵。这些花朵都有一个特殊的能力,它们能够释放出一种叫做「花之能量」的神秘力量。每朵花的花之能量都不同&…...

探索算力(云计算、人工智能、边缘计算等):数字时代的引擎

引言 在数字时代,算力是一种至关重要的资源,它是推动科技创新、驱动经济发展的关键引擎之一。简而言之,算力即计算能力,是计算机系统在单位时间内完成的计算任务数量或计算复杂度的度量。随着科技的不断发展和应用范围的不断扩大…...

数据可视化-ECharts Html项目实战(10)

在之前的文章中,我们学习了如何在ECharts中编写雷达图,实现特殊效果的插入运用,函数的插入,以及多图表雷达图。想了解的朋友可以查看这篇文章。同时,希望我的文章能帮助到你,如果觉得我的文章写的不错&…...

甲方安全建设之研发安全-SCA

前言 大多数企业或多或少的会去采购第三方软件,或者研发同学在开发代码时,可能会去使用一些好用的软件包或者依赖包,但是如果这些包中存在恶意代码,又或者在安装包时不小心打错了字母安装了错误的软件包,则可能出现供…...

[html]网页结构以及常见标签用法

哎,我服了,明明之前学了html的,但时间一长我就忘记了,本来flask学到视图了,但涉及到了html我觉得还是需要重新回顾一下,,,,,, web开发技术栈一共有3门语言。分别是: HTML:译作超文本标记语言&am…...

【C语言】if语句选择题

前言 题目一: 题目二: 题目三: 题目四: 题目五: 题目六: 题目七: 题目八: 前言 关于if语句相关的选择题 题目一: 关于if语句说法正确是:( ) A .if语…...

ZLMediaKit ubantu 下编译

1、获取代码 #国内用户推荐从同步镜像网站gitee下载 git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit cd ZLMediaKit #千万不要忘记执行这句命令 git submodule update --init二、依赖库 Debian系(包括ubuntu)系统下安装依赖的方法: #除了…...

什么是stable diffusion

机器学习中的稳定扩散 在机器学习中,特别是在深度学习中,稳定扩散可能指的是通过特定的算法,例如深度学习模型,来稳定地生成数据或样本的过程。例如,一些生成模型能够稳定地从高斯分布中采样,以生成高质量的…...

C++ list链表模拟实现

目录 前言: 模拟实现: 迭代器的实现: list类功能函数实现: 初始化成空函数(empty_init): 构造函数: 拷贝构造函数: 尾插(push_back): 插入…...

LangChain - PromptTemplate

文章目录 关于 Prompt关于 PromptTemplate基本创建无变量输入1个变量多变量使用 from_template 自动推断 input_variables 聊天模板使用 from_template 方法构建使用 PromptTemplate 构建 MessagePromptTemplate使用一或多个 MessagePromptTemplates 构建一个 ChatPromptTempla…...

spring cloud gateway openfeign 联合使用产生死锁问题

spring cloud gateway openfeign 联合使用产生死锁问题&#xff0c;应用启动的时候阻塞卡住。 spring.cloud 版本如下 <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><vers…...

【WPF应用37】WPF基本控件-DatePicker的详解与示例

WPF&#xff08;Windows Presentation Foundation&#xff09;是微软推出的一个用于构建桌面应用程序的图形子系统。在WPF中&#xff0c;DatePicker控件是一个常用的控件&#xff0c;用于用户选择日期。DatePicker控件提供了一个简洁直观的界面&#xff0c;使用户能够轻松选择日…...

GitHub教程:最新如何从GitHub上下载文件(下载单个文件或者下载整个项目文件)之详细步骤讲解(图文教程)

&#x1f42f; GitHub教程&#xff1a;最新如何从GitHub上下载文件(下载单个文件或者下载整个项目文件)之详细步骤讲解(图文教程) &#x1f4c1; 文章目录 &#x1f42f; GitHub教程&#xff1a;最新如何从GitHub上下载文件(下载单个文件或者下载整个项目文件)之详细步骤讲解(图…...

编译Nginx配置QUIC/HTTP3.0

1. 安装BoringSSL sudo apt update sudo apt install -y build-essential ca-certificates zlib1g-dev libpcre3 \ libpcre3-dev tar unzip libssl-dev wget curl git cmake ninja-build mercurial \ libunwind-dev pkg-configgit clone --depth1 https://github.com/google/b…...

【JavaWeb】Day38.MySQL概述——数据库设计-DQL

数据库设计——DQL 介绍 DQL英文全称是Data Query Language(数据查询语言)&#xff0c;用来查询数据库表中的记录。 查询关键字&#xff1a;SELECT 查询操作是所有SQL语句当中最为常见&#xff0c;也是最为重要的操作。在一个正常的业务系统中&#xff0c;查询操作的使用频次…...

如何使用Java和RabbitMQ实现延迟队列(方式二)?

前言 昨天写了一篇关于Java和RabbitMQ使用插件实现延迟队列功能的文章&#xff0c;今天来讲下另外一种方式&#xff0c;不需要RabbitMQ的插件。 前期准备&#xff0c;需要安装好docker、docker-compose的运行环境。 需要安装RabbitMQ的可以看下面这篇文章。 如何使用PHP和R…...

String.valueOf() 将各种数据类型的值转换为它们的字符串

String.valueOf() 是 Java 中 String 类的一个静态方法&#xff0c;用于将各种数据类型的值转换为它们的字符串表示形式。这个方法在多种情况下都非常有用&#xff0c;特别是当你需要将非字符串类型的值转换为字符串时。 方法签名 String.valueOf() 方法有多个重载版本&#…...

2024-04-08 NO.6 Quest3 自定义交互事件

文章目录 1 交互事件——更改 Cube 颜色2 交互事件——创建 Cube2.1 非代码方式2.2 代码方式 ​ 在开始操作前&#xff0c;我们导入上次操作的场景&#xff0c;相关介绍在 《2024-04-08 NO.5 Quest3 手势追踪进行 UI 交互-CSDN博客》 文章中。 1 交互事件——更改 Cube 颜色 …...

素描进阶:深入探索如何表现石膏像的质感

​素描进阶&#xff1a;深入探索如何表现石膏像的质感 素描&#xff0c;作为一种古老而经典的绘画方式&#xff0c;历来都被视为是艺术家们探索世界、理解形式与质感的重要工具。而在素描的过程中&#xff0c;如何精准地捕捉并表现物体的质感&#xff0c;是每位艺术家都需要深…...

flutter组件_AlertDialog

官方说明&#xff1a;A Material Design alert dialog. 翻译&#xff1a;一个材料设计警告对话框。 作者释义&#xff1a;显示弹窗&#xff0c;类似于element ui中的Dialog组件。 AlertDialog的定义 const AlertDialog({super.key,this.icon,this.iconPadding,this.iconColor,t…...

供应链领域主题:生产制造关键术语和系统

BOM&#xff08;Bill of Material&#xff09;物料清单 BOM&#xff08;Bill of Material&#xff09;物料清单&#xff0c;是计算机可以识别的产品结构数据文件&#xff0c;也是ERP的主导文件。BOM使系统识别产品结构&#xff0c;也是联系与沟通企业各项业务的纽带。ERP系统中…...

k8s_入门_kubelet安装

安装 在大致了解了一些k8s的基本概念之后&#xff0c;我们实际部署一个k8s集群&#xff0c;做进一步的了解 1. 裸机安装 采用三台机器&#xff0c;一台机器为Master&#xff08;控制面板组件&#xff09;两台机器为Node&#xff08;工作节点&#xff09; 机器的准备有两种方式…...

主干网络篇 | YOLOv5/v7 更换骨干网络之 HGNetv2 | 百度新一代超强主干网络

本改进已融入到 YOLOv5-Magic 框架。 论文地址:https://arxiv.org/abs/2304.08069 代码地址:https://github.com/PaddlePaddle/PaddleDetection 中文翻译:https://blog.csdn.net/weixin_43694096/article/details/131353118 文章目录 HGNetv2网络结构1.1 主干网络1.2 颈部…...

JUC:ScheduledThreadPoolExecutor 延迟任务线程池的使用

文章目录 ScheduledThreadPoolExecutortimer&#xff08;不建议用&#xff09;ScheduledThreadPoolExecutor处理异常应用 ScheduledThreadPoolExecutor timer&#xff08;不建议用&#xff09; timer也可以进行延迟运行&#xff0c;但是会有很多问题。 比如task1运行时间超过…...