caffe data layer example step by step

You can use a “Python” layer: a layer implemented in python to feed data into your net. (See an example for adding a type: “Python” layer here). import sys, os sys.path.insert(0, os.environ[‘CAFFE_ROOT’]+’/python’) import caffe class myInputLayer(caffe.Layer): def setup(self,bottom,top): # read parameters from `self.param_str` … def reshape(self,bottom,top): # no “bottom”s for input layer if len(bottom)>0: raise … Read more