[英]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.