【发布时间】:2019-02-25 20:06:43
【问题描述】:
Caffe 库支持自定义 Python 层。为了调试这一层,一种解决方案是在日志文件中输出一些内部变量,这就是我所做的:
class MyLayer(caffe.Layer):
def setup(self,bottom, top):
import logging
logging.info("hello the world")
在示例中,我想将一些字符串“hello the world”写入日志文件。
定义好 Python 层后,我们可以使用“caffe train”程序启动训练。但是,我在 Caffe 日志文件中找不到 Python 层日志信息(在 Unbuntu 中,它位于 /tmp/caffe_username.log.INFO_date)。有任何想法吗?谢谢。
【问题讨论】: