线性求解器Ax=b的验证
文章目录
- 前言
- Matrix Market
- Matlab IO
- Read data
- Write data
- 测试
- C++ IO
- Read and write data
- Download Matrix
- IO 代码下载
- 参考网址
前言
一般情况集成了一个线性求解器(Ax=b),我们需要验证其性能和精度,这时需要大量数据来做验证, 尤其是有不同性质的矩阵 AAA 的数据,例如:稀疏性, 对称性, 正定性, 对角占优等。
Matrix Market
Matrix Market
Matrix Market 网站提供了友好的接口和数据, 方便我们验证求解器的精度和性能,尤其是对各种性质的矩阵 AAA 都有很多数据, 包含不同维数。
Matlab IO
Read data
function [A,rows,cols,entries,rep,field,symm] = mmread(filename)
%
% function [A] = mmread(filename)
%
% function [A,rows,cols,entries,rep,field,symm] = mmread(filename)
%
% Reads the contents of the Matrix Market file 'filename'
% into the matrix 'A'. 'A' will be either sparse or full,
% depending on the Matrix Market format indicated by
% 'coordinate' (coordinate sparse storage), or
% 'array' (dense array storage). The data will be duplicated
% as appropriate if symmetry is indicated in the header.
%
% Optionally, size information about the matrix can be
% obtained by using the return values rows, cols, and
% entries, where entries is the number of nonzero entries
% in the final matrix. Type information can also be retrieved
% using the optional return values rep (representation), field,
% and symm (symmetry).
%mmfile = fopen(filename,'r');
if ( mmfile == -1 )disp(filename);error('File not found');
end;header = fgets(mmfile);
if (header == -1 )error('Empty file.')
end% NOTE: If using a version of Matlab for which strtok is not
% defined, substitute 'gettok' for 'strtok' in the
% following lines, and download gettok.m from the
% Matrix Market site.
[head0,header] = strtok(header); % see note above
[head1,header] = strtok(header);
[rep,header] = strtok(header);
[field,header] = strtok(header);
[symm,header] = strtok(header);
head1 = lower(head1);
rep = lower(rep);
field = lower(field);
symm = lower(symm);
if ( length(symm) == 0 )disp(['Not enough words in header line of file ',filename]) disp('Recognized format: ')disp('%%MatrixMarket matrix representation field symmetry')error('Check header line.')
end
if ( ~ strcmp(head0,'%%MatrixMarket') )error('Not a valid MatrixMarket header.')
end
if ( ~ strcmp(head1,'matrix') )disp(['This seems to be a MatrixMarket ',head1,' file.']);disp('This function only knows how to read MatrixMarket matrix files.');disp(' ');error(' ');
end% Read through comments, ignoring themcommentline = fgets(mmfile);
while length(commentline) > 0 & commentline(1) == '%',commentline = fgets(mmfile);
end% Read size information, then branch according to
% sparse or dense formatif ( strcmp(rep,'coordinate')) % read matrix given in sparse % coordinate matrix format[sizeinfo,count] = sscanf(commentline,'%d%d%d');while ( count == 0 )commentline = fgets(mmfile);if (commentline == -1 )error('End-of-file reached before size information was found.')end[sizeinfo,count] = sscanf(commentline,'%d%d%d');if ( count > 0 & count ~= 3 )error('Invalid size specification line.')endendrows = sizeinfo(1);cols = sizeinfo(2);entries = sizeinfo(3);if ( strcmp(field,'real') ) % real valued entries:[T,count] = fscanf(mmfile,'%f',3);T = [T; fscanf(mmfile,'%f')];if ( size(T) ~= 3*entries )message = ...str2mat('Data file does not contain expected amount of data.',...'Check that number of data lines matches nonzero count.');disp(message);error('Invalid data.');endT = reshape(T,3,entries)';A = sparse(T(:,1), T(:,2), T(:,3), rows , cols);elseif ( strcmp(field,'complex')) % complex valued entries:T = fscanf(mmfile,'%f',4);T = [T; fscanf(mmfile,'%f')];if ( size(T) ~= 4*entries )message = ...str2mat('Data file does not contain expected amount of data.',...'Check that number of data lines matches nonzero count.');disp(message);error('Invalid data.');endT = reshape(T,4,entries)';A = sparse(T(:,1), T(:,2), T(:,3) + T(:,4)*sqrt(-1), rows , cols);elseif ( strcmp(field,'pattern')) % pattern matrix (no values given):T = fscanf(mmfile,'%f',2);T = [T; fscanf(mmfile,'%f')];if ( size(T) ~= 2*entries )message = ...str2mat('Data file does not contain expected amount of data.',...'Check that number of data lines matches nonzero count.');disp(message);error('Invalid data.');endT = reshape(T,2,entries)';A = sparse(T(:,1), T(:,2), ones(entries,1) , rows , cols);endelseif ( strcmp(rep,'array') ) % read matrix given in dense % array (column major) format[sizeinfo,count] = sscanf(commentline,'%d%d');while ( count == 0 )commentline = fgets(mmfile);if (commentline == -1 )error('End-of-file reached before size information was found.')end[sizeinfo,count] = sscanf(commentline,'%d%d');if ( count > 0 & count ~= 2 )error('Invalid size specification line.')endendrows = sizeinfo(1);cols = sizeinfo(2);entries = rows*cols;if ( strcmp(field,'real') ) % real valued entries:A = fscanf(mmfile,'%f',1);A = [A; fscanf(mmfile,'%f')];if ( strcmp(symm,'symmetric') | strcmp(symm,'hermitian') | strcmp(symm,'skew-symmetric') ) for j=1:cols-1,currenti = j*rows;A = [A(1:currenti); zeros(j,1);A(currenti+1:length(A))];endelseif ( ~ strcmp(symm,'general') )disp('Unrecognized symmetry')disp(symm)disp('Recognized choices:')disp(' symmetric')disp(' hermitian')disp(' skew-symmetric')disp(' general')error('Check symmetry specification in header.');endA = reshape(A,rows,cols);elseif ( strcmp(field,'complex')) % complx valued entries:tmpr = fscanf(mmfile,'%f',1);tmpi = fscanf(mmfile,'%f',1);A = tmpr+tmpi*i;for j=1:entries-1tmpr = fscanf(mmfile,'%f',1);tmpi = fscanf(mmfile,'%f',1);A = [A; tmpr + tmpi*i];endif ( strcmp(symm,'symmetric') | strcmp(symm,'hermitian') | strcmp(symm,'skew-symmetric') ) for j=1:cols-1,currenti = j*rows;A = [A(1:currenti); zeros(j,1);A(currenti+1:length(A))];endelseif ( ~ strcmp(symm,'general') )disp('Unrecognized symmetry')disp(symm)disp('Recognized choices:')disp(' symmetric')disp(' hermitian')disp(' skew-symmetric')disp(' general')error('Check symmetry specification in header.');endA = reshape(A,rows,cols);elseif ( strcmp(field,'pattern')) % pattern (makes no sense for dense)disp('Matrix type:',field)error('Pattern matrix type invalid for array storage format.');else % Unknown matrix typedisp('Matrix type:',field)error('Invalid matrix type specification. Check header against MM documentation.');end
end%
% If symmetric, skew-symmetric or Hermitian, duplicate lower
% triangular part and modify entries as appropriate:
%if ( strcmp(symm,'symmetric') )A = A + A.' - diag(diag(A));entries = nnz(A);
elseif ( strcmp(symm,'hermitian') )A = A + A' - diag(diag(A));entries = nnz(A);
elseif ( strcmp(symm,'skew-symmetric') )A = A - A';entries = nnz(A);
endfclose(mmfile);
% Done.
Write data
function [ err ] = mmwrite(filename,A,comment,field,precision)
%
% Function: mmwrite(filename,A,comment,field,precision)
%
% Writes the sparse or dense matrix A to a Matrix Market (MM)
% formatted file.
%
% Required arguments:
%
% filename - destination file
%
% A - sparse or full matrix
%
% Optional arguments:
%
% comment - matrix of comments to prepend to
% the MM file. To build a comment matrix,
% use str2mat. For example:
%
% comment = str2mat(' Comment 1' ,...
% ' Comment 2',...
% ' and so on.',...
% ' to attach a date:',...
% [' ',date]);
% If ommitted, a single line date stamp comment
% will be included.
%
% field - 'real'
% 'complex'
% 'integer'
% 'pattern'
% If ommitted, data will determine type.
%
% precision - number of digits to display for real
% or complex values
% If ommitted, full working precision is used.
%if ( nargin == 5) precision = 16;
elseif ( nargin == 4) precision = 16;
elseif ( nargin == 3) mattype = 'real'; % placeholder, will check after FIND-ing Aprecision = 16;
elseif ( nargin == 2) comment = '';% Check whether there is an imaginary part:mattype = 'real'; % placeholder, will check after FIND-ing Aprecision = 16;
endmmfile = fopen([filename],'w');
if ( mmfile == -1 )error('Cannot open file for output');
end;[M,N] = size(A);%%%%%%%%%%%%% This part for sparse matrices %%%%%%%%%%%%%%%%
if ( issparse(A) )[I,J,V] = find(A);if ( sum(abs(imag(nonzeros(V)))) > 0 )Vreal = 0; else Vreal = 1; endif ( ~ strcmp(mattype,'pattern') & Vreal )mattype = 'real'; elseif ( ~ strcmp(mattype,'pattern') )mattype = 'complex';end
%
% Determine symmetry:
%if ( M ~= N )symm = 'general';issymm = 0;NZ = length(V);elseissymm = 1;NZ = length(V);for i=1:NZif ( A(J(i),I(i)) ~= V(i) )issymm = 0;break;endendif ( issymm )symm = 'symmetric';ATEMP = tril(A);[I,J,V] = find(ATEMP);NZ = nnz(ATEMP);elseisskew = 1;for i=1:NZif ( A(J(i),I(i)) ~= - V(i) )isskew = 0;break;endendif ( isskew )symm = 'skew-symmetric';ATEMP = tril(A);[I,J,V] = find(ATEMP);NZ = nnz(ATEMP);elseif ( strcmp(mattype,'complex') )isherm = 1;for i=1:NZif ( A(J(i),I(i)) ~= conj(V(i)) )isherm = 0;break;endendif ( isherm )symm = 'hermitian';ATEMP = tril(A);[I,J,V] = find(ATEMP);NZ = nnz(ATEMP);else symm = 'general';NZ = nnz(A);endelsesymm = 'general';NZ = nnz(A);endendend% Sparse coordinate format:rep = 'coordinate';fprintf(mmfile,'%%%%MatrixMarket matrix %s %s %s\n',rep,mattype,symm);[MC,NC] = size(comment);if ( MC == 0 )fprintf(mmfile,'%% Generated %s\n',[date]);elsefor i=1:MC,fprintf(mmfile,'%%%s\n',comment(i,:));endendfprintf(mmfile,'%d %d %d\n',M,N,NZ);cplxformat = sprintf('%%d %%d %% .%dg %% .%dg\n',precision,precision);realformat = sprintf('%%d %%d %% .%dg\n',precision);if ( strcmp(mattype,'real') )for i=1:NZfprintf(mmfile,realformat,I(i),J(i),V(i));end;elseif ( strcmp(mattype,'complex') )for i=1:NZfprintf(mmfile,cplxformat,I(i),J(i),real(V(i)),imag(V(i)));end;elseif ( strcmp(mattype,'pattern') )for i=1:NZfprintf(mmfile,'%d %d\n',I(i),J(i));end;else err = -1;disp('Unsupported mattype:')mattypeend;%%%%%%%%%%%%% This part for dense matrices %%%%%%%%%%%%%%%%
elseif ( sum(abs(imag(nonzeros(A)))) > 0 )Areal = 0; else Areal = 1; endif ( ~strcmp(mattype,'pattern') & Areal )mattype = 'real';elseif ( ~strcmp(mattype,'pattern') )mattype = 'complex';end
%
% Determine symmetry:
%if ( M ~= N )issymm = 0;symm = 'general';elseissymm = 1;for j=1:N for i=j+1:Nif (A(i,j) ~= A(j,i) )issymm = 0; break; endendif ( ~ issymm ) break; endendif ( issymm )symm = 'symmetric';elseisskew = 1;for j=1:N for i=j+1:Nif (A(i,j) ~= - A(j,i) )isskew = 0; break; endendif ( ~ isskew ) break; endendif ( isskew )symm = 'skew-symmetric';elseif ( strcmp(mattype,'complex') )isherm = 1;for j=1:N for i=j+1:Nif (A(i,j) ~= conj(A(j,i)) )isherm = 0; break; endendif ( ~ isherm ) break; endendif ( isherm )symm = 'hermitian';else symm = 'general';endelsesymm = 'general';endendend% Dense array format:rep = 'array';[MC,NC] = size(comment);fprintf(mmfile,'%%%%MatrixMarket matrix %s %s %s\n',rep,mattype,symm);for i=1:MC,fprintf(mmfile,'%%%s\n',comment(i,:));end;fprintf(mmfile,'%d %d\n',M,N);cplxformat = sprintf('%% .%dg %% .%dg\n', precision,precision);realformat = sprintf('%% .%dg\n', precision);if ( ~ strcmp(symm,'general') )rowloop = 'j';else rowloop = '1';endif ( strcmp(mattype,'real') )for j=1:Nfor i=eval(rowloop):Mfprintf(mmfile,realformat,A(i,j));endendelseif ( strcmp(mattype,'complex') )for j=1:Nfor i=eval(rowloop):Mfprintf(mmfile,cplxformat,real(A(i,j)),imag(A(i,j)));endendelseif ( strcmp(mattype,'pattern') )err = -2disp('Pattern type inconsistant with dense matrix')elseerr = -2disp('Unknown matrix type:')mattypeend
endfclose(mmfile);
测试
% 读取 bcsstk14.mtx 的矩阵信息存储于矩阵 A 中, rows cols 分别是行列
[A,rows,cols,entries,rep,field,symm] = mmread("bcsstk14.mtx");
% 将矩阵 A 写到 data.txt 文件中
mmwrite("data.txt", A, field)
[A2,rows,cols,entries,rep,field,symm] = mmread("data.txt");
error = A - A2;
error_norm = norm(error, 2)
C++ IO
在 网址 C++ IO 下载 mmio.h 和 mmio.c 文件
Read and write data
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <map>
#include "mmio.h"
#include <stdio.h>using namespace std;int main(int argc, char *argv[])
{
#if 1// read datastring fileName = "../data/bcsstk14.mtx"; int ret_code;MM_typecode matcode;FILE *f;int M, N, nz; int i, *I, *J;double *val;map<unsigned int, map<unsigned int, double> > A; // Storage in triplet mode, <row <col val> > ; A's id from zeroif ((f = fopen(fileName.c_str(), "r")) == NULL) {cerr<<"read file error, please check."<<endl;exit(1);}if (mm_read_banner(f, &matcode) != 0){printf("Could not process Matrix Market banner.\n");exit(1);}/* This is how one can screen matrix types if their application *//* only supports a subset of the Matrix Market data types. */if (mm_is_complex(matcode) && mm_is_matrix(matcode) && mm_is_sparse(matcode) ) {printf("Sorry, this application does not support ");printf("Market Market type: [%s]\n", mm_typecode_to_str(matcode));exit(1);}/* find out size of sparse matrix .... */if ((ret_code = mm_read_mtx_crd_size(f, &M, &N, &nz)) !=0) {exit(1);}/* reseve memory for matrices */I = (int *) malloc(nz * sizeof(int));J = (int *) malloc(nz * sizeof(int));val = (double *) malloc(nz * sizeof(double));/* NOTE: when reading in doubles, ANSI C requires the use of the "l" *//* specifier as in "%lg", "%lf", "%le", otherwise errors will occur *//* (ANSI C X3.159-1989, Sec. 4.9.6.2, p. 136 lines 13-15) */for (i=0; i<nz; i++) {fscanf(f, "%d %d %lg\n", &I[i], &J[i], &val[i]);I[i]--; /* adjust from 1-based to 0-based */J[i]--;}if (f != stdin) {fclose(f);}/************************//* now write out matrix *//************************/mm_write_banner(stdout, matcode);mm_write_mtx_crd_size(stdout, M, N, nz);for (i=0; i<nz; i++) {//fprintf(stdout, "%d %d %20.19g\n", I[i]+1, J[i]+1, val[i]);A[I[i]][J[i]] = val[i];}#endif#if 0// write dataconst int nz = 4;const int M = 10;const int N = 10;MM_typecode matcode; int I[nz] = { 0, 4, 2, 8 };int J[nz] = { 3, 8, 7, 5 };double val[nz] = {1.1, 2.2, 3.2, 4.4};int i;mm_initialize_typecode(&matcode);mm_set_matrix(&matcode);mm_set_coordinate(&matcode);mm_set_real(&matcode);mm_write_banner(stdout, matcode); mm_write_mtx_crd_size(stdout, M, N, nz);/* NOTE: matrix market files use 1-based indices, i.e. first elementof a vector has index 1, not 0. */for (i=0; i<nz; i++) {fprintf(stdout, "%d %d %10.3g\n", I[i]+1, J[i]+1, val[i]);}
#endifreturn 0;
}
Download Matrix
在网址的主页面可以看到 Search by matrix properties,

在之后的红色框中选择所需要的矩阵性质 回车即可。

最后利用前面介绍的 IO 的代码, 即可把矩阵导入到自己的线性求解器中, 作为验证。
IO 代码下载
以上的所有代码包括一个测试的例子均可以到我的 GitHub 网页下载,其中包含 MakeFile文件。
参考网址
Matrix Market : https://math.nist.gov/MatrixMarket/
相关文章:
线性求解器Ax=b的验证
文章目录前言Matrix MarketMatlab IORead dataWrite data测试C IORead and write dataDownload MatrixIO 代码下载参考网址前言 一般情况集成了一个线性求解器(Axb),我们需要验证其性能和精度,这时需要大量数据来做验证ÿ…...
java 事件处理机制 观察者模式
事件处理机制有三个要素事件、事件源、事件监听与java的对应关系如下事件事件源事件监听javaclassjava.util.EventObjectjava.util.EventObject 的 source 属性interfacejava.util.EventListener观察者模式又被称为发布-订阅(Publish/Subscribe)模式&…...
使用 HTML5 轻松验证表单插件
下载:https://download.csdn.net/download/mo3408/87559594 效果图: 当您通过表单从人们那里收集信息时,必须应用某种验证。如果不这样做,可能会导致客户流失、数据库中的垃圾数据甚至网站的安全漏洞。从历史上看,构建表单验证一直很痛苦。在服务器端,全栈框架会为您处理…...
【Error: ImagePullBackOff】Kubernetes中Nginx服务启动失败排查流程
❌pod节点启动失败,nginx服务无法正常访问,服务状态显示为ImagePullBackOff。 [rootm1 ~]# kubectl get pods NAME READY STATUS RESTARTS AGE nginx-f89759699-cgjgp 0/1 ImagePullBackOff 0 103…...
九龙证券|直逼1.5万亿!A股融资余额创年内新高,青睐这些行业和个股
2023年以来,A股商场震动重复,商场走势整体先扬后抑,各路资金看法纷歧,但数据显现,融资客在此期间整体持续净买入,未受到商场动摇的明显冲击,融资余额日前已迫临1.5万亿元,创出年内新…...
【JavaScript】36_正则表达式
正则表达式 正则表达式 正则表达式用来定义一个规则通过这个规则计算机可以检查一个字符串是否符合规则 或者将字符串中符合规则的内容提取出来 正则表达式也是JS中的一个对象, 所以要使用正则表达式,需要先创建正则表达式的对象 new RegExp() 可以…...
参考 | 辨别真假笔记本三星内存条 (ddr4)
参考 | 辨别真假笔记本三星内存条 (ddr4) 文章目录参考 | 辨别真假笔记本三星内存条 (ddr4)1. 三星内存条标签纸上编码的含义2. 三星内存颗粒上编码的含义3. 辨别内容参考1. 三星内存条标签纸上编码的含义 内存条贴张上面有两串值得注意的编码, 其中编码的具体意义参考三星官方…...
JavaScript Math(算数)对象
Math(算数)对象的作用是:执行常见的算数任务。在线实例round()如何使用 round()。random()如何使用 random() 来返回 0 到 1 之间的随机数。max()如何使用 max() 来返回两个给定的数中的较大的数。(在 ECMASCript v3 之前…...
MyBatis里面用了多少种设计模式?
在MyBatis的两万多行的框架源码中,使用了大量的设计模式对工程架构中的复杂场景进行解耦,这些设计模式的巧妙使用是整个框架的精华。经过整理,大概有以下设计模式,如图1所示。图101类型:创建型模式▊ 工厂模式SqlSessi…...
第三十二周精华分享(2023.02.27-2023.03.06)
本帖是知识星球各类问答以及文章精华沉淀区,而知识星球相关资源沉淀则在置顶帖的「资源沉淀」中。 学计算机的都应该知道有个局部性原理,其实局部性原理在很多场合都适用,比如80%的圈友的痛点或者疑惑其实都集中在一些固定的方面或者问题上&…...
数学建模资料整理
数学建模中有三类团队: 第一类:拿到题目,讨论,然后建模手开始建模,编程手开始处理数据,写作手开始写作。 第二类:拿到题目,团内大佬,开始建模,然后编程&#…...
设计模式---抽象工厂模式
目录 1 介绍 2 优缺点 3 实现 1 介绍 抽象工厂模式(Abstract Factory Pattern) 是围绕一个超级工厂创建其他工厂。该超级工厂又称为其他工厂的工厂。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 在抽象工厂模式中,接口是负…...
Java Web 实战 07 - 多线程基础之单例模式
大家好 , 这篇文章给大家带来的是单例模式 , 单例模式中分为懒汉模式和饿汉模式 , 懒汉模式是需要用的到的时候才去创建实例 , 而饿汉模式是程序一启动就立刻创建实例 , 在这其中还有很多其他问题需要我们去研究 推荐大家跳转到这里 , 观看效果更加 上一篇文章的链接我也贴在这…...
uniapp上实现左右关联滚动
先看效果: 代码: <template><view class"container"><!-- 左侧fixed导航区域 --><view class"left"><viewv-for"item in leftList":key"item.id"class"left_item":class…...
Docker Remote API未授权访问
目录Docker简述Docker 2375端口安全风险Docker命令连接利用声明:本文仅供学习参考,其中涉及的一切资源均来源于网络,请勿用于任何非法行为,否则您将自行承担相应后果,本人不承担任何法律及连带责任。Docker简述 Docke…...
【蓝桥杯】第十四届蓝桥杯模拟赛(第三期)C++ (弱go的记录,有问题的话求指点)
博主是菜鸡啦,代码仅供参考,只确定能过样例,嘻嘻~第一题,填空题问题描述请找到一个大于 2022 的最小数,这个数转换成十六进制之后,所有的数位(不含前导 0)都为字母(A 到 …...
算法24:LeetCode_并查集相关算法
目录 题目一:力扣547题,求省份数量 题目二:岛屿数量 题目三:岛屿数量拓展 什么是并查集,举个简单的例子。学生考试通常会以60分为及格分数,我们将60分及以上的人归类为及格学生,而60分以下归…...
TypeScript核心知识点
TypeScript 核心 类型注解 知道:TypeScript 类型注解 示例代码: // 约定变量 age 的类型为 number 类型 let age: number 18 age 19: number 就是类型注解,它为变量提供类型约束。约定了什么类型,就只能给该变量赋值什么类型的…...
基于“遥感+”融合技术在碳储量、碳收支、碳循环等多领域监测与模拟实践
以全球变暖为主要特征的气候变化已成为全球性环境问题,对全球可持续发展带来严峻挑战。2015年多国在《巴黎协定》上明确提出缔约方应尽快实现碳达峰和碳中和目标。2019年第49届 IPCC全会明确增加了基于卫星遥感的排放清单校验方法。随着碳中和目标以及全球碳盘点的现…...
外卖点餐系统小程序 PHP+UniAPP
一、介绍 本项目是给某大学餐厅开发的外面点餐系统,该项目针对校内的学生,配送由学校的学生负责配送。因此,该项目不同于互联网的外卖点餐系统。 该系统支持属于 Saas 系统,由平台端、商家端、用户端、以及配送端组成。 其中&a…...
MPNet:旋转机械轻量化故障诊断模型详解python代码复现
目录 一、问题背景与挑战 二、MPNet核心架构 2.1 多分支特征融合模块(MBFM) 2.2 残差注意力金字塔模块(RAPM) 2.2.1 空间金字塔注意力(SPA) 2.2.2 金字塔残差块(PRBlock) 2.3 分类器设计 三、关键技术突破 3.1 多尺度特征融合 3.2 轻量化设计策略 3.3 抗噪声…...
conda相比python好处
Conda 作为 Python 的环境和包管理工具,相比原生 Python 生态(如 pip 虚拟环境)有许多独特优势,尤其在多项目管理、依赖处理和跨平台兼容性等方面表现更优。以下是 Conda 的核心好处: 一、一站式环境管理:…...
SciencePlots——绘制论文中的图片
文章目录 安装一、风格二、1 资源 安装 # 安装最新版 pip install githttps://github.com/garrettj403/SciencePlots.git# 安装稳定版 pip install SciencePlots一、风格 简单好用的深度学习论文绘图专用工具包–Science Plot 二、 1 资源 论文绘图神器来了:一行…...
k8s从入门到放弃之Ingress七层负载
k8s从入门到放弃之Ingress七层负载 在Kubernetes(简称K8s)中,Ingress是一个API对象,它允许你定义如何从集群外部访问集群内部的服务。Ingress可以提供负载均衡、SSL终结和基于名称的虚拟主机等功能。通过Ingress,你可…...
IGP(Interior Gateway Protocol,内部网关协议)
IGP(Interior Gateway Protocol,内部网关协议) 是一种用于在一个自治系统(AS)内部传递路由信息的路由协议,主要用于在一个组织或机构的内部网络中决定数据包的最佳路径。与用于自治系统之间通信的 EGP&…...
Objective-C常用命名规范总结
【OC】常用命名规范总结 文章目录 【OC】常用命名规范总结1.类名(Class Name)2.协议名(Protocol Name)3.方法名(Method Name)4.属性名(Property Name)5.局部变量/实例变量(Local / Instance Variables&…...
服务器硬防的应用场景都有哪些?
服务器硬防是指一种通过硬件设备层面的安全措施来防御服务器系统受到网络攻击的方式,避免服务器受到各种恶意攻击和网络威胁,那么,服务器硬防通常都会应用在哪些场景当中呢? 硬防服务器中一般会配备入侵检测系统和预防系统&#x…...
[ICLR 2022]How Much Can CLIP Benefit Vision-and-Language Tasks?
论文网址:pdf 英文是纯手打的!论文原文的summarizing and paraphrasing。可能会出现难以避免的拼写错误和语法错误,若有发现欢迎评论指正!文章偏向于笔记,谨慎食用 目录 1. 心得 2. 论文逐段精读 2.1. Abstract 2…...
第一篇:Agent2Agent (A2A) 协议——协作式人工智能的黎明
AI 领域的快速发展正在催生一个新时代,智能代理(agents)不再是孤立的个体,而是能够像一个数字团队一样协作。然而,当前 AI 生态系统的碎片化阻碍了这一愿景的实现,导致了“AI 巴别塔问题”——不同代理之间…...
Linux-07 ubuntu 的 chrome 启动不了
文章目录 问题原因解决步骤一、卸载旧版chrome二、重新安装chorme三、启动不了,报错如下四、启动不了,解决如下 总结 问题原因 在应用中可以看到chrome,但是打不开(说明:原来的ubuntu系统出问题了,这个是备用的硬盘&a…...
