我知道 Caffe 不会让您拥有大于 2GB 的 HDF5 数据层。
我有一个大型数据集,我将大型数据集分成 5 个 <2GB 的 block 。
我在'train.txt'
文件中列出了五个文件。
如何在“HDF5Data”
层中定义它在我的网络 prototxt 文件中?
仅将它们全部列为 top 会生成错误。
有什么小例子吗?
谢谢!
干杯
最佳答案
您应该拥有包含以下内容的文本文件'train.txt'
/path/to/first.h5 /path/to/second.h5 /path/to/third.h5 /path/to/fourth.h5 /path/to/fifth.h5
然后,作为“HDF5Data”
层的源
,您应该仅'train.txt'
:
layer {
type: "HDF5Data"
name: "data"
# put your "top" here, if you have several - then go ahead
hdf5_data_param {
source: "/path/to/train.txt" # only the list file goes here.
}
include { phase: TRAIN }
}
如您所见,'/path/to/first.h5'
并未在 train.prototxt
中明确列出,仅在 train 中列出。 txt
.
关于machine-learning - 多个 HDF5 文件的 HDF5 数据层定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40310681/