今天编译的过程中遇到的问题以及查阅到的资料,记录在这里,希望可以帮到其他人. BVLC的caffe源码,如果要编译matlab的接口时,首先需要将makefile.config文件中的matlab的安装路径给到: 然后再 make all 在这里make的过程中,如果采用-j8多和编译的时候,可能会出现protobuf没有的错误,但是单核编译就没有问题,也是醉了. make matcaffe 这时候有可能会遇到系统的gcc版本与matlab支持的gcc版本不一致的问题,参照这篇博客先对gcc进行…
1. 判断是否存在指定的video_name, 若不存在,则在给定save_path下,新建一个video_name文件夹: 1 sec_path = [save_path, video_name, '/']; 2 if ~exist(sec_path,'file') 3 mkdir([save_path, video_name]); 4 end 2. 将gpuArray转换为matlab可以保存的格式,如:uint8 等. if you save the gpuArray data direc…
Tic和toc函数可以计算运行一段时间的代码. 例如: clc tic d=zeros(1,10000); for i=1:10000 d(i)=i; end toc tic c=1; for i=1:10000 c=[c:i]; end toc 运行结果如下: Elapsed time is 0.000158 seconds. Elapsed time is 0.152307 seconds. 只要用tic和toc函数,不需要自己计算前后时间的差,tic函数会记录起始时刻,toc函数会自动计算…
sind(30) %正弦函数,以角度为单位 ans =0.5000 exp(2) %以e为底的指数函数,即e^x ans =7.3891 log10(10) ans =1log(exp(1)) ans =1 floor(3.6)%朝负无穷大取整数 ans =3 ceil(3.6)%朝正无穷大取整数 ans =4 round(3.3)%四舍五入为最近的小数或整数 ans =3 sqrt(9)%算术平方根 ans =3 B1 = rand(3)%随机得到一组0到1的3*3矩…