pytest使用
主要技术内容
1.pytest设计 接口测试 框架设想
common—公共的东西封装
1.request请求
2.Session
3.断言
4.Log
5.全局变量
6.shell命令
❖ config---配置文件及读取
❖ Log—
❖ payload—请求参数—*.yaml及读取
❖ testcases—conftest.py; testcase1.py…….可以有包,最好按模块就近划分
❖ result/report— 运行数据和报告
❖ 测试 策略—组织 运行all_test.py; p0_test.py; ……
2.框架执行简化流程
1.初始化配置
2.查找测试 用例套件
3.运行套件
4.初始化测试 数据pytest.fixture()
5.执行测试用例
6.读取yaml等测试数据
7.request运行
8.assert验证
9.allure记录报告
10.可与ienkins集成发邮件
3.测试 套件设计 模块化思想



4.测试 用例和套件落地思路
搜索功能—五个接口请求—返回股票stock信息;返回讨 论信息,组合,用户,群组;综合
❖ 搜索是个套件,五个接口分别是测试 用例,鉴于pytest 套件的灵活性,可以设计为 一个文件一个类下-【搜索】 下5个不同测试 方法【接口】(或可一个文件一个方法一 个接口设计 也行,灵活性强。这需要根据实际权 衡,如 果需要灵活多选择 后者,如果相对稳 定建议前者)
❖ 如果是通用的功能,可以放在共享的文件中-conftest.py
5.pytest的相关回顾
1. pytest是一个非常成熟的全功能的Python测试 框架
2. 简单 灵活,容易上手;支持参数化;
3. 能够支持简单 的单元测试 和复杂的功能测试 ,还可以用来做 selenium/appnium等自动化测试 、接口自动化测试 (pytest+requests);
4. pytest具有很多第三方插件,并且可以自定义扩 展, 比较好用的如pytest -selenium(多浏览 器执行)、 pytest-html(完美html测试报 告生成)、 pytest-rerunfailures(失败case重复执行)、 pytest-xdist(多CPU分发 )等;pytest-assume(允许每次测试 多次失败),
5. 测试 用例的skip和xfail处理;
6. 可以很好的和jenkins集成;
7. https://docs.pytest.org/en/latest/contents.html#toc
pytest安装,导入相关依赖库
Pip install –U pytest U表示升级 ➢ Pip intall –U pytest-html ➢ pip install -U pytest-rerunfailures ➢ Pip install pytest-assume ➢ Pip install pytest-allure ➢ Pip install pytest-xdist ➢ Pip list查看 ➢ Pytest –h 帮助 兹测试学
Pytest框架结构
Import pytest
类似的setup,teardown同样更灵活,
模块级 (setup_module/teardown_module)模块始末,全局的
函数级(setup_function/teardown_function)不在类中的函数有用
类级 (setup_class/teardown_class)只在类中前后运行一次
方法级(setup_method/teardown_methond)运行在类中方法始末
session()
#这是一个模块model
import pytest@pytest.fixture(scope="module", autouse=True)
def setup_model():print("setup_model")yieldprint("teardown_model")#类class在模块中定义,它们可以包含多个方法和数据成员。
class TestClassA:def setup_class(self):print('\nsetup class')def teardown_class(self):print('\nteardown_class')#方法method是与类关联的函数def setup_method(self):print("\nsetup_method")def teardown_method(self):print("\nteardown_method")def test_method_1(self):print("TestClassA: test_method_1")def test_method_2(self):print("TestClassA: test_method_2")class TestClassB:def test_method_1(self):print("TestClassB: test_method_1")def test_method_2(self):print("TestClassB: test_method_2")#全局函数function,class内的函数function是方法methoddef setup_function():print("setup_function")def teardown_function():print("teardown_function")def test_function_1():print("test_function_1")def test_function_2():print("test_function_2")if __name__ == "__main__":pytest.main()
module
import pytest# 功能函数
def multiply(a, b):return a * b# ====== fixture ======
def setup_module():print("setup_module():在整个模块之前执行")def teardown_module():print("teardown_module():在整个模块之后执行")def setup_function(function):print("setup_function():在每个方法之前执行")def teardown_function(function):print("teardown_function():在每个方法之后执行")def test_multiply_1():print("正在执行test1")assert multiply(3, 4) == 12def test_multiply_2():print("正在执行test2")assert multiply(3, 'a') == 'aaa'
class
def multiply(a, b):"""Return the product of two numbers."""return a * b# Test fixture for the multiply function
class TestMultiply:def setup_class(cls):print("setup_class(): Executed before any method in this class")def teardown_class(cls):print("teardown_class(): Executed after all methods in this class")def setup_method(self):print("setup_method(): Executed before each test method")def teardown_method(self):print("teardown_method(): Executed after each test method")def test_multiply_3(self):"""Test multiply with two integers."""print("Executing test3")assert multiply(3, 4) == 12def test_multiply_4(self):"""Test multiply with an integer and a string (should fail)."""print("Executing test4")# Note: This test will raise a TypeError due to incompatible types.assert multiply(3, 'a') == 'aaa'
Pytest框架assert断言使用 断言:支持显示最常见的子表达式的值,包括调用,属性,比较以及二元和一元运算符。 包含,相等,不等,大于 小于运算,assertnot 假
assert “h” in “hello”(判断h在hello中)
assert 3==4(判断3=4)
assert 3!=4(判断3!=4)
assert f() ==4 (判断f()方法返回值是否=4)
assert 5>6 (判断5>6为真)
assert not xx (判断xx不为真)
assert {'0', '1', '3', '8'} == {'0', '3', '5', '8'} 断言列表或者字典
import pytestdef intest():assert 'h' in "hello"assert 3==4# (判断3=4)assert 3!=4# (判断3!=4)assert f() ==4# (判断f()方法返回值是否=4)assert 5>6# (判断5>6为真)assert not xx# (判断xx不为真)assert {'0', '1', '3', '8'} == {'0', '3', '5', '8'}# 断言列表或者字典def add(a, b):return a+b
# 测试相等def test_add1():assert add(3, 4) == 7# 测试不相等
def test_add_2():assert add(17, 22) != 50# 测试大于或等于
def test_add_3():assert add(17, 22) <= 50# 测试小于或等于
def test_add_4():assert add(17, 22) >= 38# 功能:用于判断素数
def is_prime(n):if n <= 1:return Falsefor i in range(2, n):if n % i == 0:return Falsereturn True# 判断是否为True
def test_true_1():assert is_prime(13)# 判断是否为True
def test_true_2():assert is_prime(7) is True
# 判断是否不为True
def test_true_3():assert not is_prime(4)
# 判断是否不为True
def test_true_4():assert is_prime(6) is not True
# 判断是否为False
def test_false_1():assert is_prime(8) is False# 测试包含
def test_in():a = "hello"b = "he"assert b in a# 测试不包含
def test_not_in():a = "hello"b = "hi"assert b not in aif __name__ == "__main__":pytest.main()
pytest-fixture的灵活
Fixture优势 :
1、对于setup,teardown,可以不起这两个名字,所以命名方式 灵活。(可独立命名,声明后激活)前置后置
import pytest@pytest.fixture()
def login():print('这是个登陆模块!')def test_soso(login):print('case1:登际后执行搜索')def test_cakan():print('case2:不登陆就看')def test_cart(login):print('case3:登陆,加购物车')

2、数据共享。在conftest.py配置里写方法可以实现 数据共享 ,不需要import导入。可以跨文件共享
创建conftest文件
import pytest@pytest.fixture()
def login():print('From_conftest - 这是个登陆模块!')
import pytestdef test_soso(login):print('case1:登际后执行搜索')def test_cakan():print('case2:不登陆就看')def test_cart(login):print('case3:登陆,加购物车')

3、 神奇的yield,提供返回值,不是return;;相当于setup 和 teardown
import pytest@pytest.fixture(scope="module", autouse=True)
def setup_model():print("setup_model")yieldprint("teardown_model")def test_soso(setup_model):print('case1:登际后执行搜索')def test_cakan():print('case2:不登陆就看')def test_cart(setup_model):print('case3:登陆,加购物车')if __name__ == "__main__":pytest.main()

pytest-fixture
pytest-fixture-CSDN博客
1.Fixture(scope=“function”,params=None, autouse=False, ids=None, name=None):
2.可以使用此装饰器定义fixture
1. scope:=module,session,class,function;
function:每个test都运行,默认是function的scope ,
class:每个 class的所有test只运行一次;
module:每个module的所有test只运行一次;
session:每个session只运行一次
#这是一个模块model
import pytest@pytest.fixture(scope="class", autouse=True)
def setup_model():print("setup_model_class")yieldprint("teardown_model_class")#类class在模块中定义,它们可以包含多个方法和数据成员。
class TestClassA:def setup_class(self):print('\nsetup class')def teardown_class(self):print('\nteardown_class')#方法method是与类关联的函数def setup_method(self):print("\nsetup_method")def teardown_method(self):print("\nteardown_method")def test_method_1(self):print("TestClassA: test_method_1")def test_method_2(self):print("TestClassA: test_method_2")class TestClassB:def test_method_1(self):print("TestClassB: test_method_1")def test_method_2(self):print("TestClassB: test_method_2")#全局函数function,class内的函数function是方法methoddef setup_function():print("setup_function")def teardown_function():print("teardown_function")def test_function_1():print("test_function_1")def test_function_2():print("test_function_2")if __name__ == "__main__":pytest.main()
2. params:可选多个参数调用fixture
3. Autouse:如果是True,则为 所有测试 激活fixture,如果是False,则需要显式参考来激活。
#这是一个模块model
import pytest@pytest.fixture(scope="class")
def setup_model():print("setup_model_class")yieldprint("teardown_model_class")#类class在模块中定义,它们可以包含多个方法和数据成员。
class TestClassA:def setup_class(self):print('\nsetup class')def teardown_class(self):print('\nteardown_class')#方法method是与类关联的函数def setup_method(self):print("\nsetup_method")def teardown_method(self):print("\nteardown_method")def test_method_1(self,setup_model):print("TestClassA: test_method_1")def test_method_2(self):print("TestClassA: test_method_2")class TestClassB:def test_method_1(self):print("TestClassB: test_method_1")def test_method_2(self):print("TestClassB: test_method_2")#全局函数function,class内的函数function是方法methoddef setup_function():print("setup_function")def teardown_function():print("teardown_function")def test_function_1():print("test_function_1")def test_function_2():print("test_function_2")if __name__ == "__main__":pytest.main()
4. ids:每个字符串ID的列表,每个字符串对应 于param,这是测试 ID的一部分。
import pytest@pytest.fixture(params=['www.baidu.com','www.bingying.com'],ids=['case1','case2'])
def urls(request):return request.paramdef test_url(urls):url = urlsprint("url:",url)
5. Name:fixture的名称。
3.fixture带参数传递 -通过固定参数request传递 ;传二个以上参数(通过字典,其实算一个),可 以传多个组合测试 。
import pytest@pytest.fixture(params=['www.baidu.com','www.bingying.com'],ids=['case1','case2'])
def urls(request):return request.paramdef test_url(urls):url = urlsprint("url:",url)

传一个字典
import pytest@pytest.fixture(params=[{'name':'baidu','url':'www.baidu.com'},{'name':'biying','url':'www.biying'}])
def urls_name(request):url = request.param['url']name = request.param['name']return url,namedef test_name_url(urls_name):url,name = urls_nameprint(name,url)
4.参数化:@pytest.mark.parametrize(“login_r”, test_user_data, indirect=True) indeirect=True 是把 login_r当作函数去执行
fixture传二个参数与数据驱动结合
@pytest.mark.parametrize 装饰器接受两个主要参数:
- 第一个参数是一个字符串,表示测试函数中需要参数化的参数名称,多个参数之间用逗号分隔。
- 第二个参数是一个列表或元组,其中每个元素都是一个参数组合,每个组合也是一个元组或列表,其元素顺序必须与第一个参数中列出的参数顺序相匹配。
直接在测试函数上使用
import pytest# 假设我们有一个函数,它接受两个参数并返回它们的和
def add(a, b):return a + b# 使用 parametrize 装饰器,指定测试函数的参数和对应的值
@pytest.mark.parametrize("a, b, expected", [(1, 2, 3), # 第一组参数(2, 3, 5), # 第二组参数(-1, 1, 0), # 第三组参数(0, 0, 0), # 第四组参数
])
def test_add(a, b, expected):assert add(a, b) == expected
类级别使用它,对整个类的所有测试方法进行参数化
两组数据组合
两组数据参数化,从下往上执行
pytest-fixture
1.Fixture 显示调用
2.Fixture 应用usefixtures
3.autouse=True自动激活
4.可以使用多个fixture
5.可以嵌套fixture
55:00
fixture结合parametrize+yaml进行搜索接口 测试
读取url
读取yaml文件,请求access_token,在test里create_tag
import pytest
import requests
import os
import yamldef _base_data(file_name):cur_path = os.path.dirname(os.path.realpath(__file__))yaml1 = os.path.join(cur_path, file_name)f1 = open(yaml1) # 打开yaml文件data = yaml.load(f1, Loader=yaml.FullLoader) # 使用load方法加载return data@pytest.fixture(autouse=True)
def get_base_data():base_data = _base_data('tag.yml')for v in base_data.values(): #读值print(v)return vtest_user_data2 = [{"tag": {"name": 'mou1moumou'}},{"tag": {"name": 'maimai2'}},{"tag": {"name": 'sl2ience'}}]@pytest.fixture(autouse=True)
def query_param(request):return request.param@pytest.mark.parametrize("query_param", test_user_data2, indirect=True)
def test_tag(get_base_data, query_param):method = get_base_data.get('method')url = get_base_data.get('url')params = get_base_data.get('param')res = requests.request(method=method, url=url, params=params)data = res.json()access_token = data['access_token']tag_params = query_paramresponse = requests.post('https://api.weixin.qq.com/cgi-bin/tags/create?access_token='+access_token, json=tag_params)assert 'tag' in response.json()
读取测试数据
读取多个测试数据,待解决!
import yaml
import os
import pytestdef _base_data(file_name):cur_path = os.path.dirname(os.path.realpath(__file__))yaml1 = os.path.join(cur_path, file_name)f1 = open(yaml1) # 打开yaml文件data = yaml.load(f1, Loader=yaml.FullLoader) # 使用load方法加载return data@pytest.fixture(scope="module")
def get_test_data():test_data = _base_data('tag_data.yml')test_user_data2 = test_data.get('test_user_data2')return test_user_data2@pytest.mark.parametrize("tag_data", get_test_data(), indirect=True)
def test_functionality(tag_data):# test_case 是一个字典,包含 'name', 'input', 'expected_output' 等键response= requests.get(url='https://api.weixin.qq.com/cgi-bin/token', param={'grant_type': 'client_credential','appid': 'wx2e193b26f5edc5cf','secret': '99fe9aa25e42f30fa81c5d83816e4fc7'})access_token = response['access_token']response_tag = requests.post('https://api.weixin.qq.com/cgi-bin/tags/create?access_token=' + access_token, json= tag_data)print(response_tag)
附:fixture工厂模式
私有方法
html测试报告
安装
pip install pytest-html
执行
pytest --html=report.html -vs test_yml_func.py
在当前目录生成report.html
Allure 见其他文章
相关文章:
pytest使用
主要技术内容 1.pytest设计 接口测试 框架设想 common—公共的东西封装 1.request请求 2.Session 3.断言 4.Log 5.全局变量 6.shell命令 ❖ config---配置文件及读取 ❖ Log— ❖ payload—请求参数—*.yaml及读取 ❖ testcases—conftest.py; testcase1.py…….可…...
单表查询总结与多表查询概述
1. 单表查询总结 执行顺序: 从一张表,过滤数据,进行分组,对分组后的数据再过滤,查询出来所需数据,排序之后输出; from > where > group by > having > select > order by 2. …...
redis的使用场景和持久化方式
redis的使用场景 热点数据的缓存。热点:频繁读取的数据。限时任务的操作:短信验证码。完成session共享的问题完成分布式锁。 redis的持久化方式 什么是持久化:把内存中的数据存储到磁盘的过程,同时也可以把磁盘中的数据加载到内存…...
嵌入式Linux学习: 设备树实验
设备树(DeviceTree)是一种硬件描述机制,用于在嵌入式系统和操作系统中描述硬件设备的特性、连接关系和配置信息。它提供了一种与平台无关的方式来描述硬件,使得内核与硬件之间的耦合度降低,提高了系统的可移植性和可维…...
eqmx上读取数据处理以后添加到数据库中
目录 定义一些静态变量 定时器事件的处理器 订阅数据的执行器 处理json格式数据和将处理好的数据添加到数据库中 要求和最终效果 总结一下 定义一些静态变量 // 在这里都定义成全局的 一般都定义成静态的private static MqttClient mqttClient; // mqtt客户端 private s…...
【中项】系统集成项目管理工程师-第5章 软件工程-5.3软件设计
前言:系统集成项目管理工程师专业,现分享一些教材知识点。觉得文章还不错的喜欢点赞收藏的同时帮忙点点关注。 软考同样是国家人社部和工信部组织的国家级考试,全称为“全国计算机与软件专业技术资格(水平)考试”&…...
C++学习笔记-内联函数使用和含义
引言 内联函数是C为了优化在函数的调用带来的性能开销而设计的,特别是当函数体很小且频繁调用时,内联函数可以让编译器在调用点直接展开函数体,从而避免了函数调用的开销。 一、内联函数的定义与含义 1.1 定义 内联函数是通过在函数声明或…...
数据库(MySQL)-视图、存储过程、触发器
一、视图 视图的定义、作用 视图是从一个或者几个基本表(或视图)导出的表。它与基本表不同,是一个虚表。但是视图只能用来查看表,不能做增删改查。 视图的作用:①简化查询 ②重写格式化数据 ③频繁访问数据库 ④过…...
js 优雅的实现模板方法设计模式
在JavaScript中,优雅地实现模板方法设计模式通常意味着我们要遵循一些最佳实践,如清晰地定义算法的骨架(模板方法),并确保子类能够灵活地扩展或修改这些算法中的特定步骤。由于JavaScript是一种动态语言,我…...
C语言——输入输出
C语言——输入输出 输入输出函数的类型getcharputcharprintf占位符的分类 scanf 什么是输入输出呢? 所谓输入输出是以计算机为主机而言的,往内存中输入数据为输入,反之从内存中输出数据为输出。 输入输出的功能 C语言本身是不提供输入输出功能…...
【微软蓝屏】微软Windows蓝屏问题汇总与应对解决策略
✨✨ 欢迎大家来到景天科技苑✨✨ 🎈🎈 养成好习惯,先赞后看哦~🎈🎈 🏆 作者简介:景天科技苑 🏆《头衔》:大厂架构师,华为云开发者社区专家博主,…...
OpenCV图像滤波(2)均值平滑处理函数blur()的使用
操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 在OpenCV中,blur()函数用于对图像应用简单的均值模糊(mean blur)。这种模糊效果可以通过将图像中的每个像素替…...
Android lmkd机制详解
目录 一、lmkd介绍 二、lmkd实现原理 2.1 工作原理图 2.2 初始化 2.3 oom_adj获取 2.4 监听psi事件及处理 2.5 进程选取与查杀 2.5.1 进程选取 2.5.2 进程查杀 三、关键系统属性 四、核心数据结构 五、代码时序 一、lmkd介绍 Android lmkd采用epoll方式监听linux内…...
linux shell(中)
结构化命令 if语句 if-then 最基本的结构化命令是 if-then 语句。if-then 语句的格式如下: if command thencommands ifif command; then # 通过把分号(;)放在待求值的命令尾部,可以将 then 语句写在同一行commands ifbash sh…...
VMware三种网络模式---巨细
文章目录 目录 ‘一.网络模式概述 二.桥接模式 二.NAT模式 三.仅主机模式 四.案例演示 防火墙配置: 虚拟电脑配置 前言 本文主要介绍VMware的三种网络模式 ‘一.网络模式概述 VMware中分为三种网络模式: 桥接模式:默认与宿主机VMnet0绑…...
力扣高频SQL 50 题(基础版)第一题
文章目录 力扣高频SQL 50 题(基础版)第一题1757.可回收且低脂的产品题目说明思路分析实现过程准备数据:实现方式:结果截图: 力扣高频SQL 50 题(基础版)第一题 1757.可回收且低脂的产品 题目说…...
2.1.卷积层
卷积 用MLP处理图片的问题:假设一张图片有12M像素,那么RGB图片就有36M元素,使用大小为100的单隐藏层,模型有3.6B元素,这个数量非常大。 识别模式的两个原则: 平移不变性(translation inva…...
网易《永劫无间》手游上线,掀起游戏界狂潮
原标题:网易《永劫无间》手游上线,网友:发烧严重 易采游戏网7月26日消息:自网易宣布《永劫无间》手游即将上线以来,广大游戏玩家的期待值就不断攀升。作为一款拥有丰富内容和极高自由度的游戏,《永劫无间》…...
RNN(一)——循环神经网络的实现
文章目录 一、循环神经网络RNN1.RNN是什么2.RNN的语言模型3.RNN的结构形式 二、完整代码三、代码解读1.参数return_sequences2.调参过程 一、循环神经网络RNN 1.RNN是什么 循环神经网络RNN主要体现在上下文对理解的重要性,他比传统的神经网络(传统的神…...
php 根据位置的经纬度计算距离
在开发中,我们要经常和位置打交道,要计算附近的位置、距离什么的。如下: 一.sql语句 SELECT houseID,title,location,chamber,room,toward,area,rent,is_verify,look_type,look_time, traffic,block_name,images,tag,create_time,update_time, location->&g…...
嵌入式开发工具选择与效率提升实践
1. 嵌入式开发者的工作状态与开发工具选择1.1 程序员工作场景分析嵌入式开发者在家庭办公环境中往往表现出独特的工作状态。通过观察典型的工作场景,我们可以总结出几个关键特征:专注度提升:家庭环境减少了办公室干扰,开发者更容易…...
软件测试生命周期全解析:用考试答题逻辑,零基础吃透测试核心
之前我们用考场答题的类比,轻松搞懂了软件开发生命周期,很多初学者恍然大悟:原来编程就是一场有章法的“考试”。但一场考试能不能拿到高分、能不能符合出题人(客户)的要求,光靠埋头答题(开发编…...
AceCommon:Arduino嵌入式零堆分配轻量C++工具库
1. AceCommon 库概述:面向嵌入式 Arduino 的轻量级底层工具集AceCommon 是一个专为资源受限的微控制器平台(尤其是 Arduino 生态)设计的零依赖、低开销 C 工具库。其核心设计哲学是“小而精、无侵入、可复用”。与常见的功能臃肿、依赖繁杂的…...
80+经典游戏的现代救赎:WidescreenFixesPack让老游戏焕发新生
80经典游戏的现代救赎:WidescreenFixesPack让老游戏焕发新生 【免费下载链接】WidescreenFixesPack Plugins to make or improve widescreen resolutions support in games, add more features and fix bugs. 项目地址: https://gitcode.com/gh_mirrors/wi/Widesc…...
能源监控项目避坑指南:为什么DLT645电表直连Modbus系统会失败?
能源监控项目避坑指南:为什么DLT645电表直连Modbus系统会失败? 在智慧能源项目的实施过程中,数据采集的可靠性直接关系到整个系统的运行效果。许多项目团队在遇到DLT645规约电表与Modbus系统对接时,往往会尝试直接连接,…...
别再只会抓HTTP了!手把手教你配置Fiddler抓取手机App的HTTPS请求(含证书安装避坑)
移动端HTTPS抓包实战:Fiddler配置与证书避坑指南 每次看到App里那些神秘的网络请求,你是不是也好奇它们到底在传输什么数据?作为开发者或测试人员,能够抓取和分析这些请求是基本功。但面对HTTPS加密流量,很多新手往往束…...
3步释放华硕笔记本潜能:G-Helper轻量化控制工具的极致优化指南
3步释放华硕笔记本潜能:G-Helper轻量化控制工具的极致优化指南 【免费下载链接】g-helper Lightweight Armoury Crate alternative for Asus laptops. Control tool for ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar and other models …...
Spring Boot 3.2项目实战:5分钟搞定Tomcat虚拟线程配置,让你的接口吞吐量翻倍
Spring Boot 3.2虚拟线程实战:Tomcat配置优化与性能飞跃指南 当你的电商大促接口突然面临每秒上万请求,或者文件上传服务在高并发下响应缓慢时,传统线程池往往成为性能瓶颈。Spring Boot 3.2与Java 21的虚拟线程组合,正在重新定义…...
保姆级教程:在OrangePi 5 Plus上从SSD启动Ubuntu 22.04,并配置ROS2 Humble环境
OrangePi 5 Plus开发板全栈配置指南:从SSD启动到ROS2 Humble环境搭建 拿到一块OrangePi 5 Plus开发板时,如何快速搭建一个稳定高效的开发环境?本文将手把手带你完成从系统烧录到ROS2环境配置的全过程,特别针对ARM64架构的优化方案…...
图解DySAT:5张信息图带你吃透动态图表示学习的自注意力机制
动态图神经网络DySAT:用自注意力机制捕捉时空演化的5个关键视角 当我们在社交网络上关注好友动态时,既会注意不同朋友间的关联强度(谁和谁互动更密切),也会追踪这些关系随时间的变化模式(某段关系何时变得亲…...
