The Datum Object

Kang Kim edited this page Mar 30, 2017 · 4 revisions


Datum is a Google Protobuf Message class used to store data and optionally a label. A Datum can be thought of a as a matrix with three dimensions: width, height, and channel.

Simple Example

In this example, we will create a simple Datum, set three input values, and set the label.

Datum datum;
datum.set_width(3); // our data has three inputs
datum.set_height(1); // our data is one-dimensional

google::protobuf::RepeatedField<float>* datumFloatData = datum.mutable_float_data();


Common Usage

Datum is often used in a data layer as an intermediate object which helps facilitate setting the batch's data and label (which correspond to the top blobs).

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.