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

[Llama3] ReAct Prompt 测试实验

ReAct 是一种 LLM 提示和结果处理方法,结合了推理、行动计划和知识源整合,使 LLM 超越其语言模型,并在预测中使用来自现实世界的信息。 ReAct 是推理和行动的结合。

介绍 ReAct 的论文表明它比思维链提示更好。与后者不同的是,ReAct 不会过多地幻化事实。然而,为了获得最佳结果,论文建议将 ReAct 和思维链提示与自我一致性检查结合起来。

前期准备

ReAct Prompt  llama3模板

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can.If the user demands a final answer but you are unsure, execute the thought/action/action input/observation sequence.  you have access to the following tools:
[{tool_name_and_description}]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [{tool_names}]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeat N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: {question}
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

其它大语言模型的模版

You are an assistant to give people the answer of questions.
Human may provide new question to you with a description and you should use tools to get the answer, rather than directly reply from the description.You have access to the following tools:> Search: Search for a term in Wikipedia and return the first sentence. The input to this tool should be a string to search.
> Lookup: Lookup a term in the Wikipedia article and return sentence which describes about a term. The input to this tool should be a string to lookup.To use a tool, please use the following format:```
Question: the input question you must answer
Thought: your thought about what to do
Action: the action to take, should be one of [Search, Lookup]
Action Input: the input to the action
Observation: the result of the action
... (this Thought/Action/Action Input/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input question
```Begin!Now human has provided the following question.Question: Author David Chanoff has collaborated with a U.S. Navy admiral who served as the ambassador to the United Kingdom under which President?

把Observation添加到stop token里。

问题:

Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?

可用的工具

[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]

实践步骤

实验一:

问题: Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?

执行第一次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you canyou have access to the following tools:
[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [Search, Caculator]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeat N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

运行结果

Thought: I need to find out who Olivia Wilde's boyfriend is and then calculate his current age raised to the 0.23 power.
Action: Search
Action Input: "Who is Olivia Wilde's boyfriend?"

然后我在网上查找一下Olivia Wilde's boyfriend.

搜到如下结果:

Olivia Wilde started dating Harry Styles after ending her years-long engagement to Jason Sudeikis — see their relationship timeline.

执行第二次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. you have access to the following tools:
[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [Search, Caculator]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeact N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?
Thought: I need to find out who Olivia Wilde's boyfriend is and then calculate his current age raised to the 0.23 power.
Action: Search
Action Input: "Who is Olivia Wilde's boyfriend?"
Observation: Olivia Wilde started dating Harry Styles after ending her years-long engagement to Jason Sudeikis — see their relationship timeline.
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果

结果是:

Thought: I need to find out Harry Styles' current age and then calculate his age raised to the 0.23 power.
Action: Search
Action Input: "What is Harry Styles' current age?"

在网上搜索"Harry Styles age"。 结果是:”29 years“

执行第三次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. you have access to the following tools:
[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [Search, Caculator]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeact N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?
Thought: I need to find out who Olivia Wilde's boyfriend is and then calculate his current age raised to the 0.23 power.
Action: Search
Action Input: "Who is Olivia Wilde's boyfriend?"
Observation: Olivia Wilde started dating Harry Styles after ending her years-long engagement to Jason Sudeikis — see their relationship timeline.
Thought: I need to find out Harry Styles' current age and then calculate his age raised to the 0.23 power.
Action: Search
Action Input: "What is Harry Styles' current age?"
Observation: 29 years
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果:

Thought: I need to calculate Harry Styles' age raised to the 0.23 power.
Action: Caculator
Action Input: "29^0.23"

利用计算器计算29 ^ 0.23。 得到:2.169459462491557

执行第四次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. you have access to the following tools:
[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [Search, Caculator]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeact N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?
Thought: I need to find out who Olivia Wilde's boyfriend is and then calculate his current age raised to the 0.23 power.
Action: Search
Action Input: "Who is Olivia Wilde's boyfriend?"
Observation: Olivia Wilde started dating Harry Styles after ending her years-long engagement to Jason Sudeikis — see their relationship timeline.
Thought: I need to find out Harry Styles' current age and then calculate his age raised to the 0.23 power.
Action: Search
Action Input: "What is Harry Styles' current age?"
Observation: 29 years
Thought: I need to calculate Harry Styles' age raised to the 0.23 power.
Action: Caculator
Action Input: "29^0.23"
Observation: 2.169459462491557
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果

Final Answer: The answer to the question "Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?" is Harry Styles, and his current age raised to the 0.23 power is approximately 2.17.

实验二:

问题:I want to know what privileges does Harry user have ?

工具:[
{tool_name: getUser, description:search user information including pk_user_id based on username, tool parameter: username},
{tool_name: GetRole, description:get role information including role_id based on pk_user_Id, tool parameter: pk_user_Id } ,
{tool_name: GetPrivilege, description:get all privilege based on role_id , tool parameter: role_id } 
]

执行第一次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. If the user demands a final answer but you are unsure, execute the thought/action/action input/observation sequence.you have access to the following tools:
[
{tool_name: getUser, description:search user information including pk_user_id based on username, tool parameter: username},
{tool_name: GetRole, description:get role information including role_id based on pk_user_Id, tool parameter: pk_user_Id } ,
{tool_name: GetPrivilege, description:get all privilege based on role_id , tool parameter: role_id } 
]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [GetUser, GetRole, GetPrivilege]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeat N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: I want to know what privileges does Harry user have ?
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果:

Thought: I need to get the user information first
Action: GetUser
Action Input: Harry

执行第二次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. If the user demands a final answer but you are unsure, execute the thought/action/action input/observation sequence.you have access to the following tools:
[
{tool_name: getUser, description:search user information including pk_user_id based on username, tool parameter: username},
{tool_name: GetRole, description:get role information including role_id based on pk_user_Id, tool parameter: pk_user_Id } ,
{tool_name: GetPrivilege, description:get all privilege based on role_id , tool parameter: role_id } 
]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [GetUser, GetRole, GetPrivilege]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeat N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: I want to know what privileges does Harry user have ?
Thought: I need to get the user information first
Action: GetUser
Action Input: Harry
Observation: pk_user_id =1, user_name = Harry, age: 35
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

结果:

Thought: Now that I have the user information, I need to get the role of this user
Action: GetRole
Action Input: 1

执行第三次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. If the user demands a final answer but you are unsure, execute the thought/action/action input/observation sequence.you have access to the following tools:
[
{tool_name: getUser, description:search user information including pk_user_id based on username, tool parameter: username},
{tool_name: GetRole, description:get role information including role_id based on pk_user_Id, tool parameter: pk_user_Id } ,
{tool_name: GetPrivilege, description:get all privilege based on role_id , tool parameter: role_id } 
]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [ GetUser, GetRole, GetPrivilege ]
Action Input: the input to the action
Observation: the result of the action
..(this Thought/Action/Action Input/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: I want to know what privileges does Harry user have?
Thought: I need to get the user information first
Action: GetUser
Action Input: Harry
Observation: user id is 1, user_name is Harry, age is35 .
Thought: Now that I have the user information, I need to get the role of this user
Action: GetRole
Action Input: 1
Observation: role id is 3.
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果有问题,很明显还要根据role id查询privileges.

在prompt里后面追加一个引导词Thought:

结果:

Action: GetPrivilege
Action Input: 3

执行第四次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. If the user demands a final answer but you are unsure, execute the thought/action/action input/observation sequence.you have access to the following tools:getUser: search user information including pk user id based on user name
GetRole: get role information including role id based on pk user Id
GetPrivilege: get all privilege based on role idTo use a tool, please use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [ GetUser, GetRole, GetPrivilege ]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeat N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Now human has provided the following question.Question: I want to know what privileges does Harry user have?
Thought: I need to get the user information first
Action: GetUser
Action Input: Harry
Observation: user id is 1, user_name is Harry, age is35 .
Thought: Now that I have the user information, I need to get the role of this user
Action: GetRole
Action Input: 1
Observation: role id is 3.
Thought:
Action: GetPrivilege 
Action Input: 3
Observation: previleges for role whose role id is 3 are edit account and delete account
Thought: <|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果:

I now know the final answer
Final Answer: Harry has privileges to edit account and delete account.

实验三:

问题:I need to search Apple Remote and find the program it was original designed to interact with.

执行第一次

propmt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. you have access to the following tools:
[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [Search, Caculator]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeact N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: I need to search Apple Remote and find the program it was original designed to interact with.
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果:

Thought: I need to find the original purpose of Apple Remote
Action: Search
Action Input: "Apple Remote original purpose"

搜索结果:

The Apple Remote is a remote control introduced in October 2005 by Apple. originally designed to control the Front Row media center program.

执行第二次

prompt

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Answer the following questions as best you can. you have access to the following tools:
[Search: search the latest information you needs on the internet, Caculator: use it while calculating something ]use the following format:Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [Search, Caculator]
Action Input: the input to the action
Observation: the result of the action..(this Thought/Action/Action Input/Observation can repeact N times)Thought: I now know the final answer
Final Answer: the final answer to the original input questionBegin!Question: I need to search Apple Remote and find the program it was original designed to interact with.
Thought: I need to find the original purpose of Apple Remote
Action: Search
Action Input: "Apple Remote"
Observation: The Apple Remote is a remote control introduced in October 2005 by Apple. originally designed to control the Front Row media center program.
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

执行结果:

The original program that Apple Remote was designed to interact with is Front Row.

复现失败,找寻答案中。。。

参考资料

ReAct 论文地址

相关文章:

[Llama3] ReAct Prompt 测试实验

ReAct 是一种 LLM 提示和结果处理方法&#xff0c;结合了推理、行动计划和知识源整合&#xff0c;使 LLM 超越其语言模型&#xff0c;并在预测中使用来自现实世界的信息。 ReAct 是推理和行动的结合。 介绍 ReAct 的论文表明它比思维链提示更好。与后者不同的是&#xff0c;Re…...

nodejs 某音douyin网页端搜索接口及x_bogus、a_bogus(包含完整源码)(2024-06-13)

前言 x_bogus或a_bogus算法大概是对数据、ua、时间戳、浏览器的几个指纹进行计算&#xff0c;拿到一个110位大数组&#xff0c;然后转字符&#xff0c;在头部再添加十二位随机字符&#xff0c;再进行魔改的base64加密。 问&#xff1a;抖音的x_bogus、a_bogus值有什么用&#x…...

继承深度剖析

前言 从继承开始就开始C进阶了&#xff0c; 这一块需要好好学习&#xff0c;这块知识很重要&#xff0c; 坑有点多&#xff0c;所以是面试笔试的常客。 基本概念 继承(inheritance)机制是面向对象程序设计使代码可以复用的最重要的手段&#xff0c; 它允许程序员在保持原有…...

使用 Vue 和 Ant Design 实现抽屉效果的模块折叠功能

功能描述&#xff1a; 有两个模块&#xff0c;点击上面模块的收起按钮时&#xff0c;上面的模块可以折叠&#xff0c;下面的模块随之扩展 代码实现&#xff1a; 我们在 Vue 组件中定义两个模块的布局和状态管理&#xff1a; const scrollTableY ref(560); // 表格初始高度…...

Springboot整合SpringCache+redis简化缓存开发

使用步骤&#xff1a; 1.引入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-cache</artifactId> </dependency><dependency><groupId>org.springframework.boot</groupI…...

关于EOF标识符

EOF的概念 EOF是C语言中表示文件结束的标志符号&#xff0c;通常被定义为-1&#xff0c;它用于指示已到达文件的末尾或输入流的末尾。 EOF的使用 在输入操作中&#xff0c;EOF常常用于判断是否到达了文件末尾或输入流末尾&#xff0c;以便终止读取操作。例如&#xff0c;在使…...

家用洗地机排行榜前十名:2024十大王牌机型精准种草

最近很多人都在问我洗地机相关的问题&#xff0c;不愧是改善家庭生活品质的“三神器”之一。洗地机依靠其清洁力和清洁效率吸引了越来越多的平时需要做家务人群的兴趣&#xff0c;为了解答大家关于洗地机的各种疑问&#xff0c;我把市面上目前非常火爆的洗地机型号和参数都进行…...

【Chrome插件】如何在Chrome插件开发中处理复杂数据结构的存储

最近俺在接触 Chrome 插件开发&#xff0c;需要把一个数据存放到浏览器的存储中。这个数据结构有点复杂&#xff0c;它包含一个 Map 和一个数组。我使用 chrome.storage.local API来存储这个数据&#xff0c;然后在另一个地方获取数据。保存数据的代码并没有报错&#xff0c;但…...

MySQL 保姆级教程(二):使用 MySQL 检索数据

使用 MySQL 3.2 选择数据库 使用数据库: 输入: USE 数据库名;输出: Database changed分析: 不返回任何结果&#xff0c;显示某种形式的通知 ​ 例如: 使用 crashcourse 数据库 use crashcourse; 3.3 了解数据库和表 列出所有的数据库: 输入: SHOW DATABASES;输出: --------…...

Sui Bridge在测试网上线并推出10万SUI激励计划

是一种为Sui设计的原生桥接协议&#xff0c;专门用于在Sui与其他网络之间桥接资产和数据。今天&#xff0c;Sui Bridge宣布在测试网上线。作为一种原生协议&#xff0c;Sui Bridge能够在Ethereum和Sui之间轻松且安全地转移ETH、wBTC、USDC和USDT&#xff0c;使其成为Sui基础设施…...

Spring系统学习 - Bean的作用域

bean作用域介绍 Spring框架提供了不同的作用域来管理Bean的生命周期和可见性&#xff0c;这对于控制不同类型的组件和处理并发请求尤其重要。 singleton&#xff08;默认&#xff09;&#xff1a; 每个Spring IoC容器只有一个bean实例。当容器创建bean后&#xff0c;它会被缓存…...

贪吃蛇双人模式设计(2)

敲上瘾-CSDN博客控制台程序设置_c语言控制程序窗口大小-CSDN博客贪吃蛇小游戏_贪吃蛇小游戏csdn-CSDN博客 一、功能实现&#xff1a; 玩家1使用↓ → ← ↑按键来操作蛇的方向&#xff0c;使用右Shift键加速&#xff0c;右Ctrl键减速玩家2使用W A S D按键来操作蛇的方向&am…...

mysql什么时候不需要建立索引

WHERE 条件&#xff0c;GROUP BY&#xff0c;ORDER BY 里用不到的字段&#xff0c;索引的价值是快速定位&#xff0c;如果起不到定位的字段通常是不需要创建索引的&#xff0c;因为索引是会占用物理空间的。字段中存在大量重复数据&#xff0c;不需要创建索引&#xff0c;比如性…...

热门开源项目推荐:技术与地址概览

随着开源项目的不断兴起&#xff0c;越来越多的优秀项目涌现出来&#xff0c;为开发者们提供了丰富的资源和灵感。在此&#xff0c;我将为大家推荐几个热门的开源项目&#xff0c;并附上它们的开源地址&#xff0c;以供大家参考和了解。 1. TensorFlow 项目简介&#xff1a; …...

Golang的channel

目录 基本使用 channel 数据结构 阻塞的协程队列 协程节点 构建 channel 写流程 读流程 非阻塞与阻塞 closechan(关闭) 基本使用 创建无缓存 channel c : make(chan int) //创建无缓冲的通道 cc : make(chan int,0) //创建无缓冲的通道 c 创建有缓存 channel c : m…...

DIYGW可视化开发工具:微信小程序与多端应用开发的利器

一、引言 随着移动互联网的飞速发展&#xff0c;微信小程序以其轻便、易用和跨平台的特点受到了广泛关注。然而&#xff0c;微信小程序的开发相较于传统的H5网页开发&#xff0c;在UI搭建和交互设计上存在一定的挑战。为了应对这些挑战&#xff0c;开发者们一直在寻找更加高效…...

docker——基础知识

简介 一、什么是虚拟化和容器化 ​ 实体计算机叫做物理机&#xff0c;有时也称为寄主机&#xff1b; ​ 虚拟化&#xff1a;将一台计算机虚拟化为多台逻辑计算机&#xff1b; ​ 容器化&#xff1a;一种虚拟化技术&#xff0c;操作系统的虚拟化&#xff1b;将用户空间软件实…...

SAP MMRV/MMPV 物料账期月结月底月初开关

公告&#xff1a;周一至周五每日一更&#xff0c;周六日存稿&#xff0c;请您点“关注”和“在看”&#xff0c;后续推送的时候不至于看不到每日更新内容&#xff0c;感谢。 这是一条刮刮乐&#xff0c;按住全部选中&#xff1a;点关注的人最帅最美&#xff0c;欢迎&#xff1…...

五分钟看懂如何解决FP独立站的广告投放问题

在数字化时代的浪潮中&#xff0c;跨境电商的独立站成为了商家们的新宠。与传统的电商平台相比&#xff0c;独立站在品牌建设、市场定位以及客户体验上提供了更多的自由度和创新空间。然而&#xff0c;这些独立站尤其是销售FP产品的站点&#xff0c;在广告投放上遇到了重重障碍…...

学习分享-FutureTask

前言 今天再改简历的时候回顾了之前实习用到的FutureTask&#xff0c;借此来回顾一下相关知识。 FutureTask 介绍 FutureTask 是 Java 并发包&#xff08;java.util.concurrent&#xff09;中的一个类&#xff0c;用于封装异步任务。它实现了 RunnableFuture 接口&#xff0…...

Javaweb02-XML概述

第一章 XML概述 1.XML基本概念 什么是xml&#xff1f; **a.**引入的原因&#xff1a;为了解决不同不同语言之间的数据传输的格式不同 **b.**概念&#xff1a;XML是一种可扩展标记语言&#xff0c;适用于不同数据之间的数据交换 **c.**XML文档&#xff1a;通过元素的嵌套&a…...

Linux shell编程基础

Shell 是一个用 C 语言编写的程序&#xff0c;它是用户使用 Linux 的桥梁。Shell 既是一种命令语言&#xff0c;又是一种程序设计语言。Shell 是指一种应用程序&#xff0c;这个应用程序提供了一个界面&#xff0c;用户通过这个界面访问 Linux 内核的服务。 Shell 脚本&#x…...

2024.6.12 作业 xyt

今日课堂练习&#xff1a;vector构造函数 #include <iostream> #include <vector> using namespace std;void printVector(vector<int> &v) {vector<int>::iterator iter;for(iterv.begin(); iter ! v.end(); iter){cout << *iter <<…...

QTTabBar在重置Internet Explorer后失效

网上常见的办法是&#xff1a; 打开IE浏览器>>设置>>Internet选项>>高级。勾选启用第三方浏览器扩展&#xff0c;重启后生效。 打开IE浏览器-设置–管理加载项&#xff0c;启用QTTabBar。 实际在Win10上使用的时候会遇到点开IE自动跳转到Edge的问题。这时…...

Django之云存储(一)

一、介绍 用户上传的文件以及项目中使用的静态文件,除了保存在本地服务器,还在可以保存在云服务中,比如: 阿里云七牛云(课程选用)亚马逊云等1.1、使用方式 注册账号 七牛云开发者平台 实名认证 创建空间...

推挽与开漏输出

一般来说&#xff0c;微控制器的引脚都会有一个驱动电路&#xff0c;可以配置不同类型的数字和模拟电路接口。输出模式一般会有推挽与开漏输出。 推挽输出 推挽输出&#xff08;Push-Pull Output&#xff09;&#xff0c;故名思意能输出两种电平&#xff0c;一种是推&#xf…...

Sora和快手可灵背后的核心技术 | 3DVAE:通过小批量特征交换实现身体和面部的三维形状变分自动编码器

【摘要】学习3D脸部和身体生成模型中一个解开的、可解释的和结构化的潜在表示仍然是一个开放的问题。当需要控制身份特征时,这个问题尤其突出。在本文中,论文提出了一种直观而有效的自监督方法来训练一个3D形状变分自动编码器(VAE),以鼓励身份特征的解开潜在表示。通过交换不同…...

ArcGIS Pro SDK (三)Addin控件 2 窗格界面类

ArcGIS Pro SDK &#xff08;三&#xff09;Addin控件 2 窗格界面类 目录 ArcGIS Pro SDK &#xff08;三&#xff09;Addin控件 2 窗格界面类15 ArcGIS Pro 后台选项卡15.1 添加控件15.2 Code15.2.1 选项卡按钮15.2.2 选项卡页 16 ArcGIS Pro 窗体16.1 添加控件16.2 Code 17 A…...

Ubuntu 20.04.6 LTS系统使用命令编辑静态IP地址【笔记】

rootubuntu-machine:/home# cat /etc/issue Ubuntu 20.04.6 LTS \n \l1、切换到root身份 sudo su2、编辑静态IP地址&#xff0c;示例以01-network-manager-all.yaml&#xff0c;个别系统可能是00-network-manager-all.yaml&#xff0c;以安装系统生成的文件为准。 vim /etc/n…...

Python第二语言(八、Python包)

目录 1. 什么是Python包 2. 创包步骤 2.1 new包 2.2 查看创建的包 2.3 拖动文件到包下 3. 导入包 4. 安装第三方包 4.1 什么是第三方包 4.2 安装第三方包-pip 4.3 pip网络优化 1. 什么是Python包 包下有__init__.py就是包&#xff0c;无__init__.py就是文件夹。于Ja…...