全部 - 我在使用HDF5输出文件在Caffe中工作时遇到了一些麻烦。有人在Caffe中成功使用过HDF5输出文件层吗?如果是这样,你可以提供一个例子或帮助我调试我的定义。我无法使用HD5F输出功能找到任何公开示例/教程,所以我担心它可能还不是很强大。提前致谢
这是我的原型文件:
layer {
type: "HDF5Output"
name: "hdf5output"
bottom: "Ytest" #
bottom: "ip2" #
hdf5_output_param {
file_name: "./datah5/output.h5"
}
include { phase: TEST }
}
下面复制了Caffe错误剪辑。输出文件' outfile.h5'存在并且有一些数据。 HDF5输入似乎工作正常
I0803 20:30:36.776832 27929 solver.cpp:338] Iteration 0, Testing net (#0)
I0803 20:30:36.785679 27929 hdf5_output_layer.cpp:32] Saving HDF5 file ./datah5/output.h5
I0803 20:30:36.785854 27929 hdf5_output_layer.cpp:37] Successfully saved 100 rows
I0803 20:30:36.792243 27929 hdf5_output_layer.cpp:32] Saving HDF5 file ./datah5/output.h5
HDF5-DIAG: Error detected in HDF5 (1.8.11) thread 70366426137120:
#000: ../../../src/H5D.c line 170 in H5Dcreate2(): unable to create dataset
major: Dataset
minor: Unable to initialize object
#001: ../../../src/H5Dint.c line 439 in H5D__create_named(): unable to create and link to dataset
major: Dataset
minor: Unable to initialize object
#002: ../../../src/H5L.c line 1638 in H5L_link_object(): unable to create new link to object
major: Links
minor: Unable to initialize object
#003: ../../../src/H5L.c line 1882 in H5L_create_real(): can't insert link
major: Symbol table
minor: Unable to insert object
#004: ../../../src/H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
#005: ../../../src/H5Gtraverse.c line 641 in H5G_traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
#006: ../../../src/H5L.c line 1674 in H5L_link_cb(): name already exists
major: Symbol table
minor: Object already exists
F0803 20:30:36.792457 27929 hdf5.cpp:101] Check failed: status >= 0 (-1 vs. 0) Failed to make float da
taset data
*** Check failure stack trace: ***
@ 0x3fff835520f0 (unknown)
答案 0 :(得分:1)
你的.prototxt如果完全没问题的话。您收到此错误的原因是您正在运行网络多次迭代。在第一次迭代中,HDF5Output
图层将创建名为./datah5/output.h5
的文件。但是在下一次迭代中,它将再次尝试创建具有相同名称的文件并失败。它失败了,因为文件已经存在。
要解决这个问题,你可以做两件事。