摘要:
0. 写在前面 有人说过:“神经网络用剩的logits不要扔,沾上鸡蛋液,裹上面包糠...” 这两天对知识蒸馏(Knowledge Distillation)萌生了一点兴趣,正好写一篇文章分享一下。这篇文章姑且算是一篇小科普。 前排小广告:如果觉得文章对你有帮助,欢迎点赞、关注我的小专栏ML4NLP 阅读全文
posted @ 2022-03-26 16:49
小kk_p
阅读(293)
评论(0)
推荐(0)
摘要:
因为最近在做LPR(车牌识别)的小项目,需要把图片样本导入并训练,所以写了一个小程序。 在参考了网上部分资料后,得到目标目录charSamples下,文件夹1里所有50个样本图片文件的路径。 1.dirent.hdirent,LINUX系统下的一个头文件,在这个目录下/usr/include,为了获 阅读全文
posted @ 2022-03-25 16:04
小kk_p
阅读(2918)
评论(0)
推荐(0)
摘要:
(1) 保存和加载整个模型 # 模型保存 torch.save(model, 'model.pth') # 模型加载 model = torch.load('model.pth') (2) 仅仅保存模型参数以及分别加载模型结构和参数 # 模型参数保存 torch.save(model.state_d 阅读全文
posted @ 2022-03-25 14:11
小kk_p
阅读(716)
评论(0)
推荐(0)
摘要:
https://blog.csdn.net/guyuealian/article/details/111259876 阅读全文
posted @ 2022-03-23 21:13
小kk_p
阅读(66)
评论(0)
推荐(0)
摘要:
https://zhuanlan.zhihu.com/p/37340242 阅读全文
posted @ 2022-03-23 10:20
小kk_p
阅读(29)
评论(0)
推荐(0)
摘要:
看《effective c++》,作者一直强调用std::tr1::shared_ptr,比起auto_ptr好多了。 shared_ptr采用引用计数,多个指针可以指向同一个对象;auto_ptr就不能,只能运行一个指针指向一个对象:如果要指针赋值,那么原来的指针要放弃对该对象的所有权。 恩,以后 阅读全文
posted @ 2022-03-22 21:54
小kk_p
阅读(302)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> using namespace std 阅读全文
posted @ 2022-03-20 13:55
小kk_p
阅读(108)
评论(0)
推荐(0)
摘要:
单个源文件生成可执行程序 下面是一个保存在文件 helloworld.cpp 中一个简单的 C++ 程序的代码: 单个源文件生成可执行程序 /* helloworld.cpp */ #include <iostream> int main(int argc,char *argv[]) { std:: 阅读全文
posted @ 2022-03-20 12:45
小kk_p
阅读(1841)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <functional> using namespace std; int TestFunc(int a, char c, float f) { cout << a << endl; cout << c << endl; cout << f 阅读全文
posted @ 2022-03-19 20:41
小kk_p
阅读(79)
评论(0)
推荐(0)
摘要:
#include <stdio.h> typedef int(*callback)(int, int); //声明函数指针 typedef struct A { int a; int b; }; int add(int a, int b, callback p){ return (*p)(a, b) 阅读全文
posted @ 2022-03-19 17:51
小kk_p
阅读(70)
评论(0)
推荐(0)
浙公网安备 33010602011771号