Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
bob.io.base
bob.io.base
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • bob
  • bob.io.basebob.io.base
  • Issues
  • #21

Closed
Open
Opened Jul 24, 2018 by Manuel Günther@mguenther
  • Report abuse
  • New issue
Report abuse New issue

HDF5File cannot read files written by keras/tensorflow

I have just tried to train a model with keras/tensorflow, where I wanted to add some information to the HDF5 file. Unfortunately, an exception is raised when I try to open the file model.hdf5:

>>> import bob.io.base
>>> h = bob.io.base.HDF5File("model.hdf5")
RuntimeError: HDF5File - hdf5 constructor: C++ exception caught: 'empty HDF5 dataset'

In some cases (which I cannot reproduce here), I even get a Segmentation fault crashing the Python console.

Note that the file is perfectly valid, you can open it with hdfview and h5py:

>>> import h5py
>>> h = h5py.File("model.hdf5")
>>> list(h.keys())
['model_weights', 'optimizer_weights']

I am not sure, what causes this issue. I haven't dug deeper into the code.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
2
Labels
bug C++
Assign labels
  • View project labels
Reference: bob/bob.io.base#21