1

I get the following error while running a test case for a custom built loss function in caffe. This loss function uses Reshape layer on the bottom blob to this layer (This is mentioned in the LayerSetUp() method of the Custom loss function.

Error:

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)

What could be the possible reason ?

harman
  • 333
  • 2
  • 11
  • 1
    @Shai I had forgotten to setup (call `SetUp` method) of one of the Reshape layer which I was using internally and that was the problem. There is no such error now. – harman Jul 05 '17 at 13:50
  • @Shai I had one more small doubt, I've added a softmax layer within my custom layer which takes in input part of `bottom[0]` blob. I have allotted memory to this blob using `new` operator. Should I be worried about `free`ing the memory and where exactly should I delete this memory allocation ? – harman Jul 06 '17 at 00:36
  • interesting question. But I have no clue what your code looks like... Seems like a new question to me – Shai Jul 06 '17 at 04:58
  • Here's the link to the question: [question](https://stackoverflow.com/questions/44955498/layers-within-a-layer-in-caffe) – harman Jul 06 '17 at 17:30

0 Answers0