会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一笑为红颜
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
16
下一页
2021年11月13日
图片分bit显示
摘要: 1. matlab X=double(rgb2gray(imread('F:/lena.jpg')));%将原始图像转换为灰度图像,如果本身就是灰度图可以去掉rgb2gray函数 [h w] = size(X); subplot(3,3,1); imshow(X,[]); title('原始图像')
阅读全文
posted @ 2021-11-13 00:07 为红颜
阅读(167)
评论(0)
推荐(0)
2021年11月7日
图像傅里叶变换
摘要: I = imread('F:/lena.jpg'); I=rgb2gray(I); F = fftshift(fft2(I)); % 对图像进行二维 DFT(fft2),并移至中心位置 magn = log(abs(F)); % 加 log 是便于显示,缩小值域 phase = log(angle(
阅读全文
posted @ 2021-11-07 20:09 为红颜
阅读(263)
评论(0)
推荐(0)
2021年10月23日
SquadExample
摘要: SquadExample为预处理语音数据的类。 example = SquadExample( qas_id=qas_id, question_text=question_text, context_text=context_text, answer_text=answer_text, start_
阅读全文
posted @ 2021-10-23 16:12 为红颜
阅读(81)
评论(0)
推荐(0)
2021年10月18日
类模板
摘要: 模板类的声明,一般将声明和定义放在一个文件内,后缀为.hpp。 或者,在main函数中,将所包含的头文件后缀.h改为.cpp。 #pragma once #include<iostream> using namespace std; template<class T> class MyArray {
阅读全文
posted @ 2021-10-18 16:06 为红颜
阅读(54)
评论(0)
推荐(0)
2021年10月15日
squad_convert_example_to_features
摘要: 最近在看QA,对dataset不是很了解,所以看了一下pytorch中的squad_convert_example_to_features。 1.squad_convert_example_to_features 以下为pytorch源代码: 其中example数据大致呈现(不完整): def sq
阅读全文
posted @ 2021-10-15 10:50 为红颜
阅读(707)
评论(0)
推荐(0)
2021年10月14日
encode和encode_plus和tokenizer的区别
摘要: 1.encode和encode_plus的区别 区别1. encode仅返回input_ids2. encode_plus返回所有的编码信息,具体如下:’input_ids:是单词在词典中的编码‘token_type_ids’:区分两个句子的编码(上句全为0,下句全为1)‘attention_mas
阅读全文
posted @ 2021-10-14 21:59 为红颜
阅读(6520)
评论(0)
推荐(0)
2021年10月13日
报错OSError: [WinError 126] 找不到指定的模块 self._handle = _dlopen(self._name, mode)
摘要: 遇到报错 经调试,发现错误: filename: 查找stackOverflow:https://stackoverflow.com/questions/67377972/filenotfounderror-could-not-find-module-when-using-jupyter-noteb
阅读全文
posted @ 2021-10-13 23:38 为红颜
阅读(3380)
评论(0)
推荐(0)
2021年10月6日
BertConfig, BertForQuestionAnswering, BertTokenizer
摘要: 1.BertConfig 类 BertConfigBertForQuestionAnswering BERT 模型的配置类,BERT 的超参配置都在这里。其参数(蓝色)和方法(黄色)总览如下: 参数vocab_size:词汇表大小。hidden_size=768:encoder 层和 pooler
阅读全文
posted @ 2021-10-06 10:23 为红颜
阅读(1959)
评论(0)
推荐(0)
2021年8月29日
C++使用mediainfo
摘要: MediaInfo 用来分析视频和音频文件的编码和内容信息,是一款是自由软件 (免费使用、免费获得源代码)。 我在项目软件中集成了它的DLL,发现真的是非常好用! 下面简单记录一下它的使用方法。 (系统开发平台是VC2010) 1.将下载下来的MediaInfo.dll拷贝到可执行文件夹下 链接:h
阅读全文
posted @ 2021-08-29 23:29 为红颜
阅读(476)
评论(0)
推荐(0)
2021年8月26日
栈与队列的应用
摘要: 1.栈在括号匹配中的应用 算法的思想如下:1)初始设置一个空栈,顺序读入括号。2)若是右括号,则或者使置于栈顶的最急迫期待得以消解,或者是不合法的情况(括号序列不匹配,退出程序)。3)若是左括号,则作为一个新的更急迫的期待压入栈中, 自然使原有的在栈中的所有未消解的期待的急迫性降了一级。算法结束时,
阅读全文
posted @ 2021-08-26 20:22 为红颜
阅读(373)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
16
下一页
公告