can't use h5 file

82 views
Skip to first unread message

Jens

unread,
Feb 21, 2017, 12:46:07 PM2/21/17
to Caffe Users
I0221 14:37:26.535172 19149 layer_factory.hpp:77] Creating layer image
I0221
14:37:26.535207 19149 net.cpp:84] Creating Layer image
I0221
14:37:26.535229 19149 net.cpp:380] image -> image
I0221
14:37:26.535264 19149 net.cpp:380] image -> label
I0221
14:37:26.535300 19149 hdf5_data_layer.cpp:79] Loading list of HDF5 filenames from: /home/Projekte/meine/data/1.h5
I0221
14:37:26.540329 19149 hdf5_data_layer.cpp:93] Number of HDF5 files: 8
HDF5
-DIAG: Error detected in HDF5 (1.8.11) thread 140530880969280:
 
#000: ../../../src/H5F.c line 1586 in H5Fopen(): unable to open file
    major
: File accessibilty
    minor
: Unable to open file
 
#001: ../../../src/H5F.c line 1275 in H5F_open(): unable to open file: time = Tue Feb 21 14:37:26 2017
, name = '�HDF', tent_flags = 0
    major
: File accessibilty
    minor
: Unable to open file
 
#002: ../../../src/H5FD.c line 987 in H5FD_open(): open failed
    major
: Virtual File Layer
    minor
: Unable to initialize object
 
#003: ../../../src/H5FDsec2.c line 343 in H5FD_sec2_open(): unable to open file: name = '�HDF', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
    major
: File accessibilty
    minor
: Unable to open file
F0221
14:37:26.541271 19149 hdf5_data_layer.cpp:31] Failed opening HDF5 file: HDF
*** Check failure stack trace: ***
   
@     0x7fcfe487cdaa  (unknown)
   
@     0x7fcfe487cce4  (unknown)
   
@     0x7fcfe487c6e6  (unknown)
   
@     0x7fcfe487f687  (unknown)
   
@     0x7fcfe4dfdd46  caffe::HDF5DataLayer<>::LoadHDF5FileData()
   
@     0x7fcfe4dfac6f  caffe::HDF5DataLayer<>::LayerSetUp()
   
@     0x7fcfe4dcc3f5  caffe::Net<>::Init()
   
@     0x7fcfe4dce2d2  caffe::Net<>::Net()
   
@     0x7fcfe4f227b0  caffe::Solver<>::InitTrainNet()
   
@     0x7fcfe4f23773  caffe::Solver<>::Init()
   
@     0x7fcfe4f23a4f  caffe::Solver<>::Solver()
   
@     0x7fcfe4daefd1  caffe::Creator_SGDSolver<>()
   
@           0x411218  caffe::SolverRegistry<>::CreateSolver()
   
@           0x40a85b  train()
   
@           0x4080bc  main
   
@     0x7fcfe386bf45  (unknown)
   
@           0x40892b  (unknown)
   
@              (nil)  (unknown)
Aborted
devel meine
#

Hello, the error above, i get - what is wrong?

This is model.prototxt

name: "Test_net"
layer
{
  name
: "image"
  type
: "HDF5Data"
  top
: "image"
  top
: "label"
  hdf5_data_param
{
    source
: "/home/Projekte/meine/data/1.h5"
    batch_size
: 32
 
}
  include
{
    phase
: TRAIN
 
}
}
layer
{
    name
: "conv1"
    type
: "Convolution"
    bottom
: "image"
    top
: "conv1"

    param
{ lr_mult: 1 decay_mult: 1 }
    param
{ lr_mult: 2 decay_mult: 0 }

    convolution_param
{
        num_output
: 96
        kernel_size
: 11
        stride
: 4

        weight_filler
{
            type
: "gaussian"
            std
: 0.01
       
}

        bias_filler
{
            type
: "constant"
            value
: 0
       
}
   
}
}

This is solver.prototxt

net: "model.prototxt"

test_iter
: 100
test_interval
: 500

base_lr
: 0.01
momentum
: 0.9
weight_decay
: 0.0005

lr_policy
: "inv"
gamma
: 0.0001
power
: 0.75

display
: 100

max_iter
: 10000

snapshot
: 5000
snapshot_prefix
: "snap/"

solver_mode
: CPU



And this is train.sh:

#!/usr/bin/env sh

./build/tools/caffe train \
 
--solver=./solver.prototxt \
 
--log_dir=./log


TIA
Jens

Shai Bagon

unread,
Feb 23, 2017, 4:03:12 AM2/23/17
to Caffe Users
The `'source'` argument of `"HDF5Data"` layer is **not** the path to the h5 file itself, but rather to a **text** file listing all input h5 files you are using (in case you have multiple h5 files).

See this stackoverflow thread for more information.
Reply all
Reply to author
Forward
0 new messages