How do I clear Datums from a caffe::Net in C++?

10 views
Skip to first unread message

Kevin

unread,
Sep 6, 2016, 3:22:00 PM9/6/16
to Caffe Users

I'm writing a loop that will input a large number of images as Datums into a Caffe Net. The heart of the loop is:


auto datumVector = CreateDatumVector();
float loss = 0.0;
dynamic_pointer_cast<caffe::MemoryDataLayer<float>>(net->layers()[0])->AddDatumVector(datumVector);
results = net->ForwardPrefilled(&loss);

How do I clear the Datum vector from the Net before each iteration?

Reply all
Reply to author
Forward
0 new messages