- 博客(16)
- 资源 (1)
- 收藏
- 关注
原创 图像处理的“低层特征”和“高分辨率”
直接上采样高层特征(如14×14 → 224×224)会丢失细节,导致分割边界模糊。而融合低层的高分辨率特征(如56×56)可补充局部信息,提升分割精度。这种设计解决了纯Transformer缺乏低层次细节的问题,同时克服了传统U-Net难以建模长距离依赖的局限性。经过多次池化后,特征图尺寸大幅缩小(如28×28),但每个位置的特征向量编码了更。看似矛盾,但实际上是由卷积神经网络(CNN)的层级结构决定的。例如第一层卷积后的特征图,尺寸接近原始输入(如224×224),包含丰富的。AI辅助回答
2025-02-08 17:35:20
388
原创 HDF5(.h5) 和 NumPy 压缩格式(.npz)
npy.h5:HDF5 格式,通常存储 3D 体积数据。.npz:NumPy 压缩格式,通常存储 2D 切片数据。AI辅助回答
2025-02-07 12:54:07
827
原创 二分答案二分
二分答案找到一个范围, 用二分法枚举,判断是否符合条件, 再选择最满意的答案1.跳石头, 最短间隔距离的最大值,输入格式 输入第一行包含三个整数 LLL,NNN,MMM,分别表示起点到终点的距离,起点和终点之间的岩石数,以及组委会至多移走的岩石数。接下来 NNN 行,每行一个整数,第 iii 行的整数 Di(0<Di<L)Di(0 < Di < L)Di(0<Di<L) 表示第 iii 块岩石与起点的距离。这些岩石按与起点距离从小到大的顺序给出,且不
2021-08-19 11:07:03
108
1
原创 2021-08-18
前缀和,差分定义例题定义一维前缀和s[r]=1 + 2 + 3 +…+ l-1 + l + … + r;s[r] - s[l-r] = a[l] + … + a[r];二维前缀和s[i, j] = 第i行j列格子左上部分所有元素的和以(x1, y1)为左上角,(x2, y2)为右下角的子矩阵的和为:s[x2, y2] - s[x1-1][y2] - s[x2][y1-1] + s[x1-1][y1-1];一维差分给区间[l, r]中的每个数加上c:s[l]+=c, s[r+1
2021-08-18 19:56:53
97
原创 --二叉树
二叉树基础知识存储新建一个结点查找并修改一个或多个插入一个节点创建二叉树四种遍历利用遍历重建二叉树基础知识存储#include<iostream>#include<cstdio>#include<queue>using namespace std;//二叉树结点struct node{ int data;//数据域 node* lchild;//左子树 node* rchild;//右子树};新建一个结点node * new
2021-08-13 14:08:16
97
原创 一些常用函数
素数判断bool isPrime(int n){ if(x==1) return false; for(i = 2; i <= sqrt(n); i++) if((n % i) == 0) // 如果能被除了1和它本身的数整除,就不是素数 return false; return true; // 是素数 }日期计算#include<stdio.h>//相差多少天int main(){ int y
2021-08-12 16:30:32
90
原创 静态链表相关
/* 静态链表 */#include<cstdio>#include<cstring>const int M = 10010;struct NODE{ char data; int next; bool flag;}node[M];int main(){ for(int i=0;i< M;i++) node[i].flag = false; int s1, s2, n; scanf("%d%d%d
2021-08-12 09:50:44
100
原创 动态链表相关
/* 链表 */#include<stdio.h>#include<stdlib.h>int main(){ //分配内存 int * p = (int*)malloc(sizeof(int*)); free(p); int * p = new int; delete(p); return 0;};struct node {//链表结点 int data; node* next;};node* cre
2021-08-12 09:49:16
71
原创 堆heap --堆排序
#include<cstdio>#include<queue>//priority_queueusing namespace std;int n, h[10];//堆的大小, 放堆的数组void swap(int x, int y)//交换函数, 交换堆中两个元素的值{ int t = h[x]; h[x] = h[y]; h[y] = t;}void siftdown(int i)//向下调整函数, 传入编号i向下调整{ int
2021-08-03 16:15:44
71
原创 求最短路径的几种算法
1.Floyd-Warshall算法#include <iostream> /* 解决多源最短路径 */#include <queue> /* 两点之间的最短路径 或 一点到其余各点的最短路径 */#include <map>using namespace std;int n, m, a, b, c,inf = 99999999;int e[10][10];int main(){ cin>>n>>m;//顶点,边
2021-08-03 16:14:39
232
原创 寻找最短路径 --- 图的邻阶矩阵表示法
dfs 深搜#include<cstdio> #include<algorithm>#include<cstdlib>#include<queue>using namespace std;queue<int> q;int e[100][100], v[100];int n, m, a, b, c, mi = 999999;void dfs(int cur, int dis)//当前城市编号,当前已走过的路程{ //if(
2021-08-03 16:08:26
241
原创 dfs与bfs
一维dfs#include<cstdio>#include<iostream>using namespace std;int a[10], book[10], to = 0;//装数, 标记void dfs(int step)//表示站在第几个盒子面前{ if(step == 9 + 1)//如果站在第十个盒子面前,那么前九个盒子已经放好扑克牌了 { if(a[1]*100 + a[2]*10 + a[3] +a[4] *100+ a[5]
2021-08-03 16:02:38
71
原创 图的割点与割边
/* 图的割点— */#include<cstdio>/* 用的邻接矩阵来存图, 实际应用用邻接表 */#include<algorithm>using namespace std;int n, m, e[9][9], root;int num[9], low[9], flag[9], index;//idex用来进行时间戳的递增//割点算法的核心void dfs(int cur , int father)//需要传入当前顶点编号 和 父顶点的编号{ int
2021-08-03 15:56:30
115
原创 --并查集
``#includeusing namespace std;const int N = 1e5 + 10;int p[N];int find(int x) {if (x == p[x])return x;elsereturn find(p[x]);}int main(){int n,m;cin>>n>>m;for (int i = 1; i <= m; i++) p[i] = i;char ch[10];while(n–){}return
2021-07-21 22:33:47
125
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人