Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
28e42e11
Commit
28e42e11
authored
Mar 05, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consume all hdf5 to memory
parent
61b79a46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tensorpack/dataflow/format.py
tensorpack/dataflow/format.py
+3
-1
No files found.
tensorpack/dataflow/format.py
View file @
28e42e11
...
...
@@ -6,6 +6,7 @@ import h5py
import
random
from
six.moves
import
range
from
..utils
import
logger
from
.base
import
DataFlow
"""
...
...
@@ -20,7 +21,8 @@ class HDF5Data(DataFlow):
"""
def
__init__
(
self
,
filename
,
data_paths
,
shuffle
=
True
):
self
.
f
=
h5py
.
File
(
filename
,
'r'
)
self
.
dps
=
[
self
.
f
[
k
]
for
k
in
data_paths
]
logger
.
info
(
"Loading {} to memory..."
.
format
(
filename
))
self
.
dps
=
[
self
.
f
[
k
]
.
value
for
k
in
data_paths
]
lens
=
[
len
(
k
)
for
k
in
self
.
dps
]
assert
all
([
k
==
lens
[
0
]
for
k
in
lens
])
self
.
_size
=
lens
[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment