Bekeley Caffe命令行界面 [英] Bekeley caffe command line interface

查看:77
本文介绍了Bekeley Caffe命令行界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您使用的是自定义的python层-并假设您使用python正确编写了该类-假设该类的名称为"my_ugly_custom_layer";然后您在linux命令行界面中执行caffe,

if you are using a custom python layer - and assuming you wrote the class correctly in python - let's say the name of the class is "my_ugly_custom_layer"; and you execute caffe in the linux command line interface,

如何确保caffe知道如何找到为图层编写类的文件?您是否将.py文件放置在与train.prototxt相同的目录中?

如果您使用python编写了自定义类,是否需要使用python包装器接口?

推荐答案

您的python层在prototxt中具有两个参数:layer:用于定义实现该层的python类名称,而moduule:用于定义.图层层实现所在的py文件名.
当您运行caffe(通过命令行或通过python界面)时,需要确保您的模块位于PYTHONPATH

Your python layer has two parameters in the prototxt: layer: where you define the python class name implementing your layer, and moduule: where you define the .py file name where the layer class is implemented.
When you run caffe (either from command line or via python interface) you need to make sure your module is in the PYTHONPATH

这篇关于Bekeley Caffe命令行界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆