在Caffe中编写自定义丢失图层时检查失败

时间:2017-07-03 22:01:34

标签: neural-network caffe loss glog

caffe中运行自定义内置损失函数的测试用例时,出现以下错误。此损失函数使用bottom blob上的Reshape图层到此图层(这在自定义损失函数的LayerSetUp()方法中提到。

错误:

F0704 01:49:54.075613 16977 blob.cpp:145] Check failed: diff_ 
*** Check failure stack trace: ***
    @     0x7f627a1965cd  google::LogMessage::Fail()
    @     0x7f627a198433  google::LogMessage::SendToLog()
    @     0x7f627a19615b  google::LogMessage::Flush()
    @     0x7f627a198e1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f62754dd96b  caffe::Blob<>::mutable_cpu_diff()
    @           0x500e8a  caffe::CustomLossLayerTest_TestRead_Test<>::TestBody()
    @           0x940693  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0x939caa  testing::Test::Run()
    @           0x939df8  testing::TestInfo::Run()
    @           0x939ed5  testing::TestCase::Run()
    @           0x93b1af  testing::internal::UnitTestImpl::RunAllTests()
    @           0x93b4d3  testing::UnitTest::Run()
    @           0x46f5fd  main
    @     0x7f6274811830  __libc_start_main
    @           0x477229  _start
    @              (nil)  (unknown)
Makefile:532: recipe for target 'runtest' failed
make: *** [runtest] Aborted (core dumped)

可能的原因是什么?

0 个答案:

没有答案