1 - Get (a pointer to) the blob
2 - Get the number of elements in the blob
3 - Copy your array to the blob
1
shared_ptr<Blob<float> > blob_ptr = caffeNet->blob_by_name( blob_name );
float *blob_content = blob_ptr->mutable_cpu_data();
2
const unsigned input_size = blob_ptr->count();
3
copy( input_ptr, input_ptr + input_size, blob_content );
Maybe, caffe has already a built-in function for this...
If anyone knows, pls tell me.