[英]How to create Data layer in caffe?
我有Python版本的Caffe代碼。 也就是說Python代碼具有data layer
等
name: "hidden_seed"
type: "NumpyData"
top: "hidden_seed"
我喜歡用c ++ caffe裝箱
layer{
name: "hidden_seed"
type: "Data"
top: "hidden_seed"
}
我的查詢是如何創建大小為300 x 250且初始化為0的數據層。
我查看了caffe中的數據層,可用的數據層是
Layers:
Image Data - read raw images.
Database - read data from LEVELDB or LMDB.
HDF5 Input - read HDF5 data, allows data of arbitrary dimensions.
HDF5 Output - write data as HDF5.
Input - typically used for networks that are being deployed.
Window Data - read window data file.
Memory Data - read data directly from memory.
Dummy Data - for static data and debugging.
我想擁有哪一個適合數據層,以及如何為每個單元初始化0值?
似乎"DummyData"
層將為您完成這項工作:
layer {
type: "DummyData"
name: "hidden_seed"
top: "hidden_seed"
dummy_data_param {
shape { dim: 300 dim: 250 } # your desired data shape
data_filler { type: "constant" value: 0 } # fill with all zeros
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.