惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
量子位
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
爱范儿
爱范儿
博客园 - 【当耐特】
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
博客园 - 叶小钗
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
B
Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
V
V2EX

Caffe

种草了 GENE CAFE 烘豆机,想尝试一下自己烘豆,各位 V 友有使用过这台机器的吗? 分享一个 Caffe2 on iOS 的 demo project 新手试运行了一个 caffe 的 Python 代码,出现这个错误是怎么回事? 请问谁有 pycaffe 的教程或者 reference? 有人翻译过 caffe 框架的那篇论文么 关于 caffe 中卷积层 filter 的一个小疑问,求解答~~~~ Caffe 里 set_phase_test 是在新版本更名了吗?
caffe 能不能把 transformer 进行“持久化”存储下来?以免每次...
Reign · 2017-04-27 · via Caffe

caffe 中示例的如下代码:
import numpy as np
import sys,os
caffe_root = '/opt/caffe/'
sys.path.insert(0, caffe_root + 'python')
import caffe
os.chdir(caffe_root)
net_file=caffe_root + 'deploy.prototxt'
caffe_model=caffe_root + 'test.caffemodel'
mean_file=caffe_root + 'mean.npy'
net = caffe.Net(net_file,caffe_model,caffe.TEST)
transformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape})
transformer.set_transpose('data', (2,0,1))
transformer.set_mean('data', np.load(mean_file).mean(1).mean(1))
transformer.set_raw_scale('data', 255)
transformer.set_channel_swap('data', (2,1,0))
#把 transformer 持久化存储下来
im=caffe.io.load_image(caffe_root+'/sample/1.jpg')
net.blobs['data'].data[...] = transformer.preprocess('data',im)
out = net.forward()
print out
服务器没 GPU,每次加载一个 transformer 非常耗时,我就在想只加载一次,能不能持久化把这个 transformer 存储下来,以后每次测试图片直接调用就行了?
另外,如果使用别人已经建立好了的 caffemodel 来测试,是不是有了 GPU 会更快些?
机器学习新手问题估计比较幼稚,还是先谢谢了