上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页
摘要: 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 为红颜 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 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 为红颜 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 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 为红颜 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 模板类的声明,一般将声明和定义放在一个文件内,后缀为.hpp。 或者,在main函数中,将所包含的头文件后缀.h改为.cpp。 #pragma once #include<iostream> using namespace std; template<class T> class MyArray { 阅读全文
posted @ 2021-10-18 16:06 为红颜 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 最近在看QA,对dataset不是很了解,所以看了一下pytorch中的squad_convert_example_to_features。 1.squad_convert_example_to_features 以下为pytorch源代码: 其中example数据大致呈现(不完整): def sq 阅读全文
posted @ 2021-10-15 10:50 为红颜 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 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 为红颜 阅读(5190) 评论(0) 推荐(0) 编辑
摘要: 遇到报错 经调试,发现错误: filename: 查找stackOverflow:https://stackoverflow.com/questions/67377972/filenotfounderror-could-not-find-module-when-using-jupyter-noteb 阅读全文
posted @ 2021-10-13 23:38 为红颜 阅读(2992) 评论(0) 推荐(0) 编辑
摘要: 1.BertConfig 类 BertConfigBertForQuestionAnswering BERT 模型的配置类,BERT 的超参配置都在这里。其参数(蓝色)和方法(黄色)总览如下: 参数vocab_size:词汇表大小。hidden_size=768:encoder 层和 pooler 阅读全文
posted @ 2021-10-06 10:23 为红颜 阅读(1638) 评论(0) 推荐(0) 编辑
摘要: MediaInfo 用来分析视频和音频文件的编码和内容信息,是一款是自由软件 (免费使用、免费获得源代码)。 我在项目软件中集成了它的DLL,发现真的是非常好用! 下面简单记录一下它的使用方法。 (系统开发平台是VC2010) 1.将下载下来的MediaInfo.dll拷贝到可执行文件夹下 链接:h 阅读全文
posted @ 2021-08-29 23:29 为红颜 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1.栈在括号匹配中的应用 算法的思想如下:1)初始设置一个空栈,顺序读入括号。2)若是右括号,则或者使置于栈顶的最急迫期待得以消解,或者是不合法的情况(括号序列不匹配,退出程序)。3)若是左括号,则作为一个新的更急迫的期待压入栈中, 自然使原有的在栈中的所有未消解的期待的急迫性降了一级。算法结束时, 阅读全文
posted @ 2021-08-26 20:22 为红颜 阅读(349) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页