会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Lovaer
为了平凡地生活而拚尽全力,哪怕为此燃烧殆尽我的灵魂。
博客园
首页
新随笔
联系
管理
上一页
1
2
3
4
5
6
7
8
···
12
下一页
2020年10月8日
KMP变形
摘要: 自己发明的KMP,蜜汁操作和书上不太一样,过了HDU两道题,应该没错。 1 #include<bits/stdc++.h> 2 #define ll long long 3 #define scan(i) scanf("%d",&i) 4 #define scand(i) scanf("%lf",&
阅读全文
posted @ 2020-10-08 20:17 Lovaer
阅读(228)
评论(0)
推荐(1)
2020年10月6日
中国剩余定理
摘要: 1 #include<iostream> 2 #include<string> 3 #include<cstdio> 4 typedef long long ll; 5 using namespace std; 6 const int maxn=100000+5; 7 int n; 8 ll ai[
阅读全文
posted @ 2020-10-06 18:29 Lovaer
阅读(110)
评论(0)
推荐(0)
2020年9月26日
pytorch深度学习:卷积神经网络
摘要: CNN中的果蝇,哈哈。 1 import torch 2 from torchvision import datasets,transforms 3 from torch import nn,optim 4 import torch.nn.functional as F 5 6 trans=(tra
阅读全文
posted @ 2020-09-26 18:55 Lovaer
阅读(121)
评论(0)
推荐(0)
2020年9月24日
无题
摘要: 伤心这个词不足以形容我现在的状态,用失魂落魄更合适。 这种夹杂着焦虑的低谷感,难以描述。但我又很清楚地知道我痛苦的来源。这世界上的一切痛苦,本质上都是对自己无能的愤怒。 我恨自己,只因为自己是个普通人。 我所指的普通人和平凡人,是不一样的。平凡是指生活之平凡,平凡之中孕含着稳定,平淡的日子清甜如水,
阅读全文
posted @ 2020-09-24 21:34 Lovaer
阅读(121)
评论(2)
推荐(0)
2020年9月21日
pytorch深度学习:一般分类器
摘要: 使用的criterion不是MSE而是交叉熵。 numpy.shape,tensor.size(),正确遍历变量。 另外 CrossEntropyLoss的参数真是有够饶人的。 1 import torch 2 from torch import nn,optim 3 import matplotl
阅读全文
posted @ 2020-09-21 10:24 Lovaer
阅读(456)
评论(0)
推荐(0)
2020年9月19日
pytorch深度学习:非线性模型
摘要: 1. 这篇博客使用深度学习框架搭建了一个预测三次函数的模型 2. 正则化很重要,一定要normalize,否则神经网络就是垃圾 1 import torch 2 from torch import nn,optim 3 import torch.nn.functional as F 4 from m
阅读全文
posted @ 2020-09-19 15:04 Lovaer
阅读(1196)
评论(0)
推荐(0)
2020年9月16日
pytorch深度学习:线性回归
摘要: 深度学习版线性回归,哈哈哈哈。 在潘神的嘲笑下,我发了这篇博客,呜呜。 1 import torch 2 from torch import nn,optim 3 4 class LR(nn.Module): 5 def __init__(self): 6 super(LR, self).__ini
阅读全文
posted @ 2020-09-16 13:25 Lovaer
阅读(193)
评论(0)
推荐(0)
2020年9月15日
tarjian求LCA
摘要: 1 //tarjian离线求LCA 2 #include<cstdio> 3 #define N 420000 4 struct hehe{ 5 int next; 6 int to; 7 int lca; 8 }; 9 hehe edge[N];//树的链表 10 hehe qedge[N];//
阅读全文
posted @ 2020-09-15 09:50 Lovaer
阅读(114)
评论(0)
推荐(0)
2020年9月12日
tarjian求强联通分量
摘要: 1 //求强联通分量 2 #include<bits/stdc++.h> 3 const int N=1e5+7; 4 const int M=1e5+7; 5 struct node{ 6 int v,next; 7 }e[M]; 8 int head[N],cnt; 9 int p[N],st[
阅读全文
posted @ 2020-09-12 20:24 Lovaer
阅读(130)
评论(0)
推荐(0)
2020年8月20日
查询区间里有多少个小于k的数
摘要: 用主席树可以在线做,树状数组只能离线。 先放个主席树的。 1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<queue> 5 #include<set> 6 #include<string> 7 #inc
阅读全文
posted @ 2020-08-20 20:40 Lovaer
阅读(673)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
12
下一页
公告