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

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

Caffe

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

完全的 caffe 新手,研究了一天的 caffe ,虽然糊里糊涂的, GitHub 上找了个项目: https://github.com/BestiVictory/ILGnet 在网上找了个 Python 代码照猫画虎写成如下:

import numpy as np

import matplotlib.pyplot as plt

caffe_root = '/opt/caffe/'

import sys

sys.path.insert(0, caffe_root + 'python')

import caffe

MODEL_FILE = caffe_root + 'ILGnet/deploy.prototxt'

PRETRAINED = caffe_root + 'ILGnet/ILGnet-AVA2.caffemodel'

IMAGE_FILE = caffe_root+'examples/images/cat.jpg'

mean_file=caffe_root + 'ILGnet/AVA2_mean.npy'

caffe.set_mode_cpu()

net = caffe.Classifier(MODEL_FILE, PRETRAINED,

mean=np.load(mean_file).mean(1).mean(1),

channel_swap=(2,1,0),

raw_scale=255,

image_dims=(227, 227))

input_image = caffe.io.load_image(IMAGE_FILE)

plt.imshow(input_image)

prediction = net.predict([input_image])

plt.plot(prediction[0])

plt.show()

print 'predicted class:', prediction[0].argmax()

然后就出现: F0423 12:33:29.282009 172 insert_splits.cpp:35] Unknown bottom blob 'label' (layer 'loss1/loss', bottom index 1)

完全新手,估计代码错的很离谱,大家就别嘲笑了哈,想问一下这个如果 Python 实现的话该怎样写? V 站高手多,希望能得到解答,真诚谢谢~