def add_layer_with_data(self,layer_params,datas, before='', after=''):
        """
        Args:
            layer_params:A Layer_Param object
            datas:a fixed dimension numpy object list
            after: put the layer after a specified layer
            before: put the layer before a specified layer
        """
        self.add_layer(layer_params,before,after)
        new_layer =self.layer(layer_params.name)

        #process blobs
        del new_layer.blobs[:]
        for data in datas:
            new_blob=new_layer.blobs.add()
            for dim in data.shape:
                new_blob.shape.dim.append(dim)
            new_blob.data.extend(data.flatten().astype(float))

        Args:
            layer_params:A Layer_Param object
            datas:a fixed dimension numpy object list
            after: put the layer after a specified layer
            before: put the layer before a specified layer
        
tools/deploy/Caffe/caffe_net.py