CPP Classification and intermediate layer outputs

13 views
Skip to first unread message

Gurunath Kadam

unread,
Apr 30, 2018, 5:24:57 PM4/30/18
to Caffe Users
Hi *,

I want to write a CPP classification program for MNIST (and later maybe CIFAR10).

I am using classification.cpp in the Caffe example folder as a reference.

I am however stuck at printing intermediate layer outputs. I see net_->Forward() call.
Which then returns the output of the output layer.

I believe I should be able to get the intermediate outputs without needing to modify the internal layer files.
Is there an C++ API for this?

Thank you.

Przemek D

unread,
Aug 17, 2018, 9:10:10 AM8/17/18
to Caffe Users
I can only suggest revisiting the Blobs, Layers, and Nets tutorial, and then reading the C++ headers, especially for Net and Layer. You can get from your net to any of its layers or blobs, and then retrieve the data as arrays (Blob::cpu_data()).
Reply all
Reply to author
Forward
0 new messages