Caffe源码中blob文件分析
Caffe源碼(caffe version commit: 09868ac , date: 2015.08.15)中有一些重要的頭文件,這里介紹下include/caffe/blob.hpp文件的內容:
1.??????Include文件:
(1)、<caffe/common.hpp>:此文件的介紹可以參考:http://blog.csdn.net/fengbingchun/article/details/54955236
(2)、<caffe/proto/caffe.pb.h>:此文件的介紹可以參考:http://blog.csdn.net/fengbingchun/article/details/55267162
(3)、<caffe/syncedmem.hpp>:此文件的介紹可以參考:http://blog.csdn.net/fengbingchun/article/details/56665919
(4)、<caffe/util/math_functinons.hpp>:此文件的介紹可以參考:http://blog.csdn.net/fengbingchun/article/details/56280708
2.????????全局常量kMaxBlobAxes:
由const聲明的全局常量kMaxBlobAxes表示Blob可以支持的最高維數,目前設置的支持的最高維數為32。
3.????????類Blob:
Blob是Caffe中處理和傳遞實際數據的數據封裝包,并且在CPU與GPU之間具有數據同步處理能力。從數學意義上說,blob是按C風格連續存儲的N維數組,即在內部所存儲的數據是一塊連續的內存。
Blob是用來存儲圖像數據、網絡參數(包括權值、偏置以及它們的梯度)、模型參數、學習到的參數、網絡傳輸過程中產生的數據、網絡中間的處理結果、優化過程的偏導數等各種數據。
Blob可以動態改變數組的尺寸,當拓展數組導致原有內存空間不足以存放下數據時(count_>capacity_),就會通過Reshape函數實現重新確定空間大小。
Blob數據可以通過Protobuf來做相應的序列化操作,ToProto和FromProto兩個函數完成相應的序列化、反序列化(數據解析)操作。
Caffe基于blobs存儲和交換數據。網絡各層之間的數據都是通過Blob來傳遞的。為了便于優化,blobs提供統一的內存接口來存儲某種類型的數據,例如批量圖像數據、模型參數以及用來進行優化的導數。
blobs可根據CPU主機與GPU設備的同步需要,屏蔽CPU/GPU混合運算在計算上的開銷。主機和設備上的內存按需分配,以提高內存的使用效率。
對于批量圖像數據來說,blob常規的維數為圖像數量N*通道數K*圖像高度H*圖像寬度W。blob按行為主(row-major)進行存儲,所以一個4維blob中,坐標為(n,k,h,w)的值的物理位置為((n*K+k)*H+h)*W+w,這也使得最后面/最右邊的維度更新最快,其中:
(1)、Number/N是每個批次處理的數據量。批量處理信息有利于提供設備處理和交換的數據的吞吐率。在ImageNet上每個訓練批量為256張圖像,則N=256;
(2)、Channel/K是特征維度,例如對RGB圖像來說,可以理解為通道數量,K=3;如果是網絡中間結果,就是feature map的數量;
(3)、H、W:如果是圖像數據,可以理解為圖像的高度和寬度;如果是參數數據,可以理解為濾波核的高度和寬度。
雖然Caffe的圖像應用例子中很多blobs都是4維坐標,但是對于非圖像應用任務,blobs也完全可以照常使用。
參數Blob的維度是根據層的類型和配置而變化的。
對于blob中的數據,我們關心的是values(值)和gradients(梯度),所以一個blob單元存儲了兩塊數據------data_和diff_。前者是我們在網絡中傳送的普通數據,后者是通過網絡計算得到的梯度。而且,由于數據既可存儲在CPU上,又可存儲在GPU上,因而有兩種數據訪問方式,如在CPU上的data_:靜態方式,不改變數值(const Dtype* cpu_data() const;);動態方式,改變數值(Dtype*mutable_cpu_data();)。GPU和diff_的操作與在CPU上的data_類似。
之所以這么設計是因為blob使用了一個SyncedMemory類來同步CPU和GPU上的數據,以隱藏同步的細節和最小化傳送數據。一個經驗準則是,如果不想改變數據,就一直使用常量調用,而且決不要在自定義類中存儲指針。每次操作blob時,調用相應的函數來獲取它的指針,因為SyncedMemory需要用這種方式來確定何時需要復制數據。
實際上,使用GPU時,Caffe中CPU代碼先從磁盤中加載數據到blob,同時請求分配一個GPU設備核(devicekernel)以使用GPU進行計算,再將計算好的blob數據送入下一層,這樣既實現了高效運算,又忽略了底層細節。只要所有layers均有GPU實現,這種情況下所有的中間數據和梯度都會保留在GPU 上。
注:以上關于Blob內容的介紹主要摘自由CaffeCN社區翻譯的《Caffe官方教程中譯本》。
<caffe/blob.hpp>文件的詳細介紹如下:
#ifndef CAFFE_BLOB_HPP_
#define CAFFE_BLOB_HPP_#include <algorithm>
#include <string>
#include <vector>#include "caffe/common.hpp"
#include "caffe/proto/caffe.pb.h"
#include "caffe/syncedmem.hpp"
#include "caffe/util/math_functions.hpp"// 全局常量,用來表示Blob可以支持的最高維數
const int kMaxBlobAxes = 32;namespace caffe {/*** @brief A wrapper around SyncedMemory holders serving as the basic*        computational unit through which Layer%s, Net%s, and Solver%s*        interact.** TODO(dox): more thorough description.*/
template <typename Dtype>
class Blob {public:
// 默認不帶參數的構造函數,初始化count_=0,capacity_=0Blob() : data_(), diff_(), count_(0), capacity_(0) {}/// @brief Deprecated; use <code>Blob(const vector<int>& shape)</code>.
// 帶參數的顯示構造函數,推薦使用帶vector<int>參數的構造函數
// 這兩個構造函數內部會均會調用Reshape(const vector<int>)函數
// 注:執行這兩個構造函數后,并不會真正分配內存空間,只是用來設置當前blob的shape_、count_和capacity_大小explicit Blob(const int num, const int channels, const int height, const int width);explicit Blob(const vector<int>& shape);/// @brief Deprecated; use <code>Reshape(const vector<int>& shape)</code>.
// Reshape系列函數通過輸入參數用來設置或重新設置當前blob的shape_、count_和capacity_大小
// 推薦使用帶vector<int>參數的Reshape函數
// 內部會調用SyncedMemory的構造函數,但不會真正分配內存空間
// 通過num/channes/height/width參數設置shape_、count_和capacity_大小void Reshape(const int num, const int channels, const int height, const int width);/*** @brief Change the dimensions of the blob, allocating new memory if*        necessary.** This function can be called both to create an initial allocation* of memory, and to adjust the dimensions of a top blob during Layer::Reshape* or Layer::Forward. When changing the size of blob, memory will only be* reallocated if sufficient memory does not already exist, and excess memory* will never be freed.** Note that reshaping an input blob and immediately calling Net::Backward is* an error; either Net::Forward or Net::Reshape need to be called to* propagate the new input shape to higher layers.*/
// 通過vector<int>參數設置shape_、count_和capacity_大小void Reshape(const vector<int>& shape);
// 通過類BlobShape參數設置shape_、count_和capacity_大小
// BlobShape是定義在caffe.proto中的一個message,其字段有dimvoid Reshape(const BlobShape& shape);
// 通過外部的blob參數來設置shape_、count_和capacity_大小void ReshapeLike(const Blob& other);// 以string類型獲得當前blob的shape_和count_值inline string shape_string() const {ostringstream stream;for (int i = 0; i < shape_.size(); ++i) {stream << shape_[i] << " ";}stream << "(" << count_ << ")";return stream.str();}// 獲得當前Blob的所有維度值inline const vector<int>& shape() const { return shape_; }/*** @brief Returns the dimension of the index-th axis (or the negative index-th*        axis from the end, if index is negative).** @param index the axis index, which may be negative as it will be*        "canonicalized" using CanonicalAxisIndex.*        Dies on out of range index.*/
// 獲得當前Blob指定索引的維度值inline int shape(int index) const {return shape_[CanonicalAxisIndex(index)];}// 獲得當前Blob的維數inline int num_axes() const { return shape_.size(); }// 獲得當前Blob的元素個數inline int count() const { return count_; }/*** @brief Compute the volume of a slice; i.e., the product of dimensions*        among a range of axes.** @param start_axis The first axis to include in the slice.** @param end_axis The first axis to exclude from the slice.*/
// 根據指定的start axis和end axis(部分blob)計算blob元素個數inline int count(int start_axis, int end_axis) const {CHECK_LE(start_axis, end_axis);CHECK_GE(start_axis, 0);CHECK_GE(end_axis, 0);CHECK_LE(start_axis, num_axes());CHECK_LE(end_axis, num_axes());int count = 1;for (int i = start_axis; i < end_axis; ++i) {count *= shape(i);}return count;}/*** @brief Compute the volume of a slice spanning from a particular first*        axis to the final axis.** @param start_axis The first axis to include in the slice.*/
// 根據指定的start axis(部分blob)計算blob元素個數inline int count(int start_axis) const {return count(start_axis, num_axes());}/*** @brief Returns the 'canonical' version of a (usually) user-specified axis,*        allowing for negative indexing (e.g., -1 for the last axis).** @param index the axis index.*        If 0 <= index < num_axes(), return index.*        If -num_axes <= index <= -1, return (num_axes() - (-index)),*        e.g., the last axis index (num_axes() - 1) if index == -1,*        the second to last if index == -2, etc.*        Dies on out of range index.*/
// Blob的index可以是負值,對參數axis_index進行判斷,結果返回一個正的索引值
// 如果axis_index是負值,則要求axis_index>=-shape_.size(),則返回axis_index+shape_.size()
// 如果axis_index是正值,則要求axis_index<shape_.size(),則直接返回axis_indexinline int CanonicalAxisIndex(int axis_index) const {CHECK_GE(axis_index, -num_axes())<< "axis " << axis_index << " out of range for " << num_axes()<< "-D Blob with shape " << shape_string();CHECK_LT(axis_index, num_axes())<< "axis " << axis_index << " out of range for " << num_axes()<< "-D Blob with shape " << shape_string();if (axis_index < 0) {return axis_index + num_axes();}return axis_index;}/// @brief Deprecated legacy shape accessor num: use shape(0) instead.
// 獲得當前blob的num,推薦調用shape(0)函數inline int num() const { return LegacyShape(0); }/// @brief Deprecated legacy shape accessor channels: use shape(1) instead.
// 獲得當前blob的channels,推薦調用shape(1)函數inline int channels() const { return LegacyShape(1); }/// @brief Deprecated legacy shape accessor height: use shape(2) instead.
// 獲得當前blob的height,推薦調用shape(2)函數inline int height() const { return LegacyShape(2); }/// @brief Deprecated legacy shape accessor width: use shape(3) instead.
// 獲得當前blob的width,推薦調用shape(3)函數inline int width() const { return LegacyShape(3); }
// 獲得當前blob的某一維度值inline int LegacyShape(int index) const {CHECK_LE(num_axes(), 4)<< "Cannot use legacy accessors on Blobs with > 4 axes.";CHECK_LT(index, 4);CHECK_GE(index, -4);if (index >= num_axes() || index < -num_axes()) {// Axis is out of range, but still in [0, 3] (or [-4, -1] for reverse// indexing) -- this special case simulates the one-padding used to fill// extraneous axes of legacy blobs.return 1;}return shape(index);}// 根據num、channels、height、width計算偏移量:((n*K+k)*H+h)*W+winline int offset(const int n, const int c = 0, const int h = 0, const int w = 0) const {CHECK_GE(n, 0);CHECK_LE(n, num());CHECK_GE(channels(), 0);CHECK_LE(c, channels());CHECK_GE(height(), 0);CHECK_LE(h, height());CHECK_GE(width(), 0);CHECK_LE(w, width());return ((n * channels() + c) * height() + h) * width() + w;}
// 根據vector<int> index計算偏移量:((n*K+k)*H+h)*W+winline int offset(const vector<int>& indices) const {CHECK_LE(indices.size(), num_axes());int offset = 0;for (int i = 0; i < num_axes(); ++i) {offset *= shape(i);if (indices.size() > i) {CHECK_GE(indices[i], 0);CHECK_LT(indices[i], shape(i));offset += indices[i];}}return offset;}/*** @brief Copy from a source Blob.** @param source the Blob to copy from* @param copy_diff if false, copy the data; if true, copy the diff* @param reshape if false, require this Blob to be pre-shaped to the shape*        of other (and die otherwise); if true, Reshape this Blob to other's*        shape if necessary*/
// 從外部blob拷貝數據到當前的blob
// 若reshape參數為true,如果兩邊blob的reshape不相同,則會重新reshape
// 若copy_diff為false,則拷貝data_數據;若copy_diff為true,則拷貝diff_數據void CopyFrom(const Blob<Dtype>& source, bool copy_diff = false, bool reshape = false);// 根據給定的位置訪問數據
// 根據指定的偏移量獲得前向傳播數據data_的一個元素的值inline Dtype data_at(const int n, const int c, const int h, const int w) const {return cpu_data()[offset(n, c, h, w)];}
// 根據指定的偏移量獲得反向傳播梯度diff_的一個元素的值inline Dtype diff_at(const int n, const int c, const int h, const int w) const {return cpu_diff()[offset(n, c, h, w)];}
// 根據指定的偏移量獲得前向傳播數據data_的一個元素的值inline Dtype data_at(const vector<int>& index) const {return cpu_data()[offset(index)];}
// 根據指定的偏移量獲得反向傳播梯度diff_的一個元素的值inline Dtype diff_at(const vector<int>& index) const {return cpu_diff()[offset(index)];}// 獲得前向傳播數據data_的指針inline const shared_ptr<SyncedMemory>& data() const {CHECK(data_);return data_;}
// 獲得反向傳播梯度diff_的指針inline const shared_ptr<SyncedMemory>& diff() const {CHECK(diff_);return diff_;}// Blob的數據訪問函數,包括CPU和GPU
// 帶mutable_前綴的函數是可以對Blob數據進行改寫的;其它不帶的是只讀的,不允許改寫數據const Dtype* cpu_data() const; // 調用SyncedMemory::cpu_data()函數const Dtype* gpu_data() const; // 調用SyncedMemory::gpu_data()函數const Dtype* cpu_diff() const; // 調用SyncedMemory::cpu_data()函數const Dtype* gpu_diff() const; // 調用SyncedMemory::gpu_data()函數Dtype* mutable_cpu_data(); // 調用SyncedMemory::mutable_cpu_data()函數Dtype* mutable_gpu_data(); // 調用SyncedMemory::mutable_gpu_data()函數Dtype* mutable_cpu_diff(); // 調用SyncedMemory::mutable_cpu_data()函數Dtype* mutable_gpu_diff(); // 調用SyncedMemory::mutable_gpu_data()函數void set_cpu_data(Dtype* data); // 調用SyncedMemory::set_cpu_data(void*)函數// 它會被網絡中存儲參數的Blob調用,完成梯度下降過程中的參數更新
// 調用caffe_axpy函數重新計算data_(weight,bias 等減去對應的導數): data_ = -1 * diff_ + data_void Update();// Blob的數據持久化函數,通過Protobuf來做相應的序列化/反序列化操作
// BlobProto是定義在caffe.proto中的一個message,其字段有shape(BlobShape)、data、diff、num、channels、height、width
// 將BlobProto的shape/data/diff分別copy給當前blob的shape_/data_/diff_完成數據解析(反序列化)
// 若reshape參數為true,則會對當前的blob重新進行reshapevoid FromProto(const BlobProto& proto, bool reshape = true);
// 將Blob的shape_/data_/diff_(如果write_diff為true)分別copy給BlobProto的shape/data/diff完成序列化void ToProto(BlobProto* proto, bool write_diff = false) const;/// @brief Compute the sum of absolute values (L1 norm) of the data.
// 計算data_的L1范式:向量中各個元素絕對值之和Dtype asum_data() const;/// @brief Compute the sum of absolute values (L1 norm) of the diff.
// 計算diff_的L1范式:向量中各個元素絕對值之和Dtype asum_diff() const;/// @brief Compute the sum of squares (L2 norm squared) of the data.
// 計算data_的L2范式平方:向量中各元素的平方和Dtype sumsq_data() const;/// @brief Compute the sum of squares (L2 norm squared) of the diff.
// // 計算diff_的L2范式平方:向量中各元素的平方和Dtype sumsq_diff() const;/// @brief Scale the blob data by a constant factor.
// 將data_數據乘以一個因子:X = alpha*Xvoid scale_data(Dtype scale_factor);/// @brief Scale the blob diff by a constant factor.
// 將diff_數據乘以一個因子:X = alpha*Xvoid scale_diff(Dtype scale_factor);/*** @brief Set the data_ shared_ptr to point to the SyncedMemory holding the*        data_ of Blob other -- useful in Layer%s which simply perform a copy*        in their Forward pass.** This deallocates the SyncedMemory holding this Blob's data_, as* shared_ptr calls its destructor when reset with the "=" operator.*/
// 將外部指定的blob的data_指針指向給當前blob的data_,以實現共享data_void ShareData(const Blob& other);/*** @brief Set the diff_ shared_ptr to point to the SyncedMemory holding the*        diff_ of Blob other -- useful in Layer%s which simply perform a copy*        in their Forward pass.** This deallocates the SyncedMemory holding this Blob's diff_, as* shared_ptr calls its destructor when reset with the "=" operator.*/
// 將外部指定的blob的diff_指針指向給當前blob的diff_,以實現共享diff_void ShareDiff(const Blob& other);
// 比較兩個blob的shape是否相同
// BlobProto是定義在caffe.proto中的一個message,其字段有shape(BlobShape)、data、diff、num、channels、height、widthbool ShapeEquals(const BlobProto& other);protected:
// Caffe中類的成員變量名都帶有后綴"_",這樣就容易區分臨時變量和類成員變量shared_ptr<SyncedMemory> data_; // 存儲前向傳播的數據shared_ptr<SyncedMemory> diff_; // 存儲反向傳播的導數、梯度、偏差vector<int> shape_; // Blob的維度值,通過Reshape函數的shape參數獲得相應值,若為4維,則依次為num、channels、height、widthint count_; // 表示Blob中的元素個數,shape_所有元素的乘積int capacity_; // 表示當前Blob的元素個數(控制動態分配),因為Blob可能會reshape// 禁止使用Blob類的拷貝和賦值操作DISABLE_COPY_AND_ASSIGN(Blob);
};  // class Blob}  // namespace caffe#endif  // CAFFE_BLOB_HPP_
 在caffe.proto文件中,有3個message是與blob有關的,如下:
// 可選package聲明符,用來防止不同的消息類型有命名沖突
package caffe; // 以下所有生成的信息將會在命名空間caffe內: namespace caffe { ... }// 說明:帶"deprecated"關鍵字的信息可以不用看,過時的,后面有可能是被廢棄的// 以下三個是關于blob的三個類:BlobShape、BlobProto、BlobProtoVector
// Specifies the shape (dimensions) of a Blob.
message BlobShape { // 數據塊形狀(Blob的維度),若為4維,則為num、channel、height、widthrepeated int64 dim = 1 [packed = true]; // blob shape數組
}message BlobProto { // blob屬性類optional BlobShape shape = 7; // BlobShappe類對象repeated float data = 5 [packed = true]; // float類型的data,前向repeated float diff = 6 [packed = true]; // float類型的diff,后向repeated double double_data = 8 [packed = true]; // double類型的data,前向repeated double double_diff = 9 [packed = true]; // double類型的diff,后向// 4D dimensions -- deprecated.  Use "shape" instead.// 已使用BlobShape shape替代optional int32 num = 1 [default = 0];optional int32 channels = 2 [default = 0];optional int32 height = 3 [default = 0];optional int32 width = 4 [default = 0];
}// The BlobProtoVector is simply a way to pass multiple blobproto instances
// around.
message BlobProtoVector { // 存放多個BlobProto實例repeated BlobProto blobs = 1;
}
 blob的測試代碼如下:
#include "funset.hpp"
#include <string>
#include <vector>
#include "common.hpp"int test_caffe_blob()
{caffe::Blob<float> blob1;std::vector<int> shape{ 2, 3, 4, 5 };caffe::Blob<float> blob2(shape);std::vector<int> blob_shape = blob2.shape();fprintf(stderr, "blob shape: ");for (auto index : blob_shape) {fprintf(stderr, "%d    ", index);}std::vector<int> shape_{ 6, 7, 8, 9 };blob2.Reshape(shape_);std::vector<int> blob_shape_ = blob2.shape();fprintf(stderr, "\nnew blob shape: ");for (auto index : blob_shape_) {fprintf(stderr, "%d    ", index);}fprintf(stderr, "\n");int value = blob2.shape(-1);fprintf(stdout, "blob index -1: %d\n", value);int num_axes = blob2.num_axes();fprintf(stderr, "blob num axes(dimension): %d\n", num_axes);int count = blob2.count();fprintf(stderr, "blob count sum: %d\n", count);count = blob2.count(2, 4);fprintf(stderr, "blob count(start_axis(2), end_axis(4)): %d\n", count);count = blob2.count(1);fprintf(stderr, "blob count(start_axis(1)): %d\n", count);int canonical_axis_index = blob2.CanonicalAxisIndex(-2);fprintf(stderr, "blob canonical axis index: %d\n", canonical_axis_index);int num = blob2.num();int channels = blob2.channels();int height = blob2.height();int width = blob2.width();int legacy_shape = blob2.LegacyShape(-2);fprintf(stderr, "blob num: %d, channels: %d, height: %d, width: %d, legacy shape(-2): %d\n",num, channels, height, width, legacy_shape);std::vector<int> indices{ 2, 3, 7, 6 };int offset1 = blob2.offset(indices);int offset2 = blob2.offset(indices[0], indices[1], indices[2], indices[3]);fprintf(stderr, "blob offset1: %d, offset2: %d\n", offset1, offset2);std::string shape_string = blob2.shape_string();fprintf(stderr, "shape string: %s\n", shape_string.c_str());caffe::BlobProto blob_proto;blob_proto.set_num(6);blob_proto.set_channels(7);blob_proto.set_height(8);blob_proto.set_width(9);bool flag = blob2.ShapeEquals(blob_proto);fprintf(stderr, "blob2's shape and blob_proto's shape are equal: %d\n", flag);int blob_proto_data_size_float = blob_proto.data_size();int blob_proto_data_size_double = blob_proto.double_data_size();int blob_proto_diff_size_float = blob_proto.diff_size();int blob_proto_diff_size_double = blob_proto.double_diff_size();fprintf(stderr, "blob_proto data/diff size: %d, %d, %d, %d\n", blob_proto_data_size_float,blob_proto_data_size_double, blob_proto_diff_size_float, blob_proto_diff_size_double);caffe::BlobShape blob_proto_shape;for (int i = 0; i < 4; ++i) {blob_proto_shape.add_dim(i + 10);}blob2.Reshape(blob_proto_shape);blob_shape_ = blob2.shape();fprintf(stderr, "new blob shape: ");for (auto index : blob_shape_) {fprintf(stderr, "%d    ", index);}fprintf(stderr, "\n");fprintf(stderr, "blob proto shape: ");for (int i = 0; i < blob_proto_shape.dim_size(); ++i) {fprintf(stderr, "%d    ", blob_proto_shape.dim(i));}fprintf(stderr, "\n");// 注:以上進行的所有操作均不會申請分配任何內存// cv::Mat -> Blobstd::string image_name = "E:/GitCode/Caffe_Test/test_data/images/a.jpg";cv::Mat mat = cv::imread(image_name, 1);if (!mat.data) {fprintf(stderr, "read image fail: %s\n", image_name.c_str());return -1;}cv::Mat mat2;mat.convertTo(mat2, CV_32FC3);std::vector<int> mat_reshape{ 1, mat2.channels(), mat2.rows, mat2.cols };blob2.Reshape(mat_reshape);float sum1 = blob2.asum_data();blob2.set_cpu_data((float*)mat2.data);float sum2 = blob2.asum_data();blob2.scale_data(0.5);float sum3 = blob2.asum_data();float sum4 = blob2.sumsq_data();fprintf(stderr, "sum1: %f, sum2: %f, sum3: %f, sum4: %f\n", sum1, sum2, sum3, sum4);float value2 = blob2.data_at(0, 2, 100, 200);fprintf(stderr, "data at value: %f\n", value2);const float* data = blob2.cpu_data();fprintf(stderr, "data at 0: %f\n", data[0]);cv::Mat mat3;mat2.convertTo(mat3, CV_8UC3);image_name = "E:/GitCode/Caffe_Test/test_data/images/a_ret.jpg";cv::imwrite(image_name, mat3);return 0;
}
 測試結果如下:
GitHub:https://github.com/fengbingchun/Caffe_Test
總結
以上是生活随笔為你收集整理的Caffe源码中blob文件分析的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: Intel TBB简介及在Windows
 - 下一篇: Caffe源码中io文件分析