会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
乌蝇哥
不做懒狗
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
6
下一页
2024年4月23日
VSCode中无法import文件夹中的文件(出现波浪下划线)
摘要: 在这个文件夹中加入空的__init__.py 就可以解决这个问题
阅读全文
posted @ 2024-04-23 20:35 乌蝇哥
阅读(142)
评论(0)
推荐(0)
2024年4月18日
git删除历史中的某个大文件
摘要: 本地的git的commit的历史中曾经有一次提交过一个大文件,后来的提交中删除了这个文件。但是git push不允许这样大文件的提交,我该如何做才能不带这个大文件进行提交呢? git filter-branch --force --index-filter "git rm --cached --ig
阅读全文
posted @ 2024-04-18 10:31 乌蝇哥
阅读(31)
评论(0)
推荐(0)
2023年2月27日
torch 早停代码 early stop
摘要: https://blog.csdn.net/t18438605018/article/details/123646329
阅读全文
posted @ 2023-02-27 15:45 乌蝇哥
阅读(105)
评论(0)
推荐(0)
2022年12月5日
给整数型随机变量画hist
摘要: plt.hist()的参数density=True时候,纵轴是概率密度而不是概率(特别的:当bins的大小=1的时候,概率密度=概率。用这个方法就可以给整数型随机变量画出概率统计图了)。 plt.hist()的参数density=False时候,纵轴是频次。当bins的大小=1时,可以给整数型随机变
阅读全文
posted @ 2022-12-05 16:03 乌蝇哥
阅读(94)
评论(0)
推荐(0)
python画概率密度直方图+曲线图
摘要: import pandas as pd x = np.random.randn(1000) data = pd.Series(x) # 将数据由数组转换成series形式 plt.hist(data,density = True,edgecolor ='w',label = '直方图') data.
阅读全文
posted @ 2022-12-05 15:58 乌蝇哥
阅读(2554)
评论(0)
推荐(0)
2022年12月4日
pandas画相关性矩阵
摘要: f = plt.figure(figsize=(19, 15)) plt.matshow(df.corr(), fignum=f.number) plt.xticks(range(df.shape[1]), df.columns, fontsize=14, rotation=45) plt.ytic
阅读全文
posted @ 2022-12-04 18:11 乌蝇哥
阅读(95)
评论(0)
推荐(0)
2022年11月20日
含有nan的数据,计算pearson
摘要: 如果使用pandas Series求Pearson的函数corr: 如果是相同位置是NAN,就无视这些NAN,用剩下的元素来计算Pearson。 如果是不同位置是NAN,就会计算得出NAN。 pandas DataFrame求Pearson的函数corrwith: 如果某一个向量中有某个位置是NAN
阅读全文
posted @ 2022-11-20 22:08 乌蝇哥
阅读(270)
评论(0)
推荐(0)
2022年8月12日
使用bash脚本并行运行多个程序
摘要: #!/bin/bash command1 & command2 & wait从 Shell 脚本并行运行多个程序 – 杨河老李 (kviccn.github.io)
阅读全文
posted @ 2022-08-12 14:23 乌蝇哥
阅读(277)
评论(0)
推荐(0)
2022年7月6日
检测是否torch的CUDA是否可用的代码
摘要: import torch print(torch.cuda.is_available()) # 返回True 接着用下列代码进一步测试 print(torch.zeros(1).cuda())
阅读全文
posted @ 2022-07-06 17:13 乌蝇哥
阅读(625)
评论(0)
推荐(0)
2022年7月1日
torch训练和推理的模板
摘要: def train(epoch): model.train() train_loss = 0 for data, label in train_loader: data, label = data.cuda(), label.cuda() # 将数据放入显卡 optimizer.zero_grad(
阅读全文
posted @ 2022-07-01 20:12 乌蝇哥
阅读(397)
评论(0)
推荐(0)
1
2
3
4
5
6
下一页
公告