Human-level concept learning through probabilistic program induction代码验证

最近老师要我看看这篇文章,有些细节文章上体会不是很深,于是把代码拿来看看,调通代码也是走了很多弯路,这里记录下来。

首先代码的来源:https://github.com/brendenlake/BPL

作者也写了需要的支撑库与代码实现过程

我用的matlab2015b上面要求的库只需要安装加速的库,根据网址下载,然后放在matlab的安装包的工具箱里面:D:\matlab2015b\toolbox



然后打开matlab

Human-level concept learning through probabilistic program induction代码验证_第1张图片

设置路径里面添加我们下载的文件夹


Human-level concept learning through probabilistic program induction代码验证_第2张图片

保存,关闭。

这时候直接运行代码是跑不通的,显示如下错误:

Human-level concept learning through probabilistic program induction代码验证_第3张图片


意思是我们添加了库,但是并没有安装好。这时候打开install_lightspeed.m这个文件,并在当前的目录下运行这个文件,否则会报错。



这里给了提示,于是在你放这个库的文件下,运行这个m文件,成功安装。


Human-level concept learning through probabilistic program induction代码验证_第4张图片

这时候提示了要测试一下,我当时没测试,直接运行了demo_fit文件,还是显示前面的错误,所以重新安装了加速器,再测试了一下




测试完了再运行demo文件,成功通过。


Human-level concept learning through probabilistic program induction代码验证_第5张图片

Human-level concept learning through probabilistic program induction代码验证_第6张图片


Human-level concept learning through probabilistic program induction代码验证_第7张图片



我这开始添加库的时候多添加了一个cvm的工具箱,导致和加速库的函数重名,matlab一度奔溃,重装了好几次,现在弄好了,故记录下来。


你可能感兴趣的:(物体检测,one—shot,learning)