from a script on preparing data for a caffe network, the following piece of code turns an image (numpy array representing an image) into a datum object.
datum = caffe_pb2.Datum(
channels=3,
width=224,
height=224,
label=label,
data=np.rollaxis(img, 2).tostring())
If the network were unsupervised, do you just create the object the same way but do not fill the label parameter, as shown below?
datum = caffe_pb2.Datum(
channels=3,
width=224,
height=224,
data=np.rollaxis(img, 2).tostring())