Skip to content

Commit

Permalink
Test the client/server of H5Dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
dsblank committed Sep 8, 2018
1 parent 900fc1d commit f785403
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions conx/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2106,6 +2106,9 @@ def __init__(self, f, filename, key, input_banks, target_banks, cache_size=3200,
use_session=True, use_cache=False):
"""
Fonts from:
https://erikbern.com/2016/01/21/analyzing-50k-fonts-using-deep-neural-networks.html
>>> def f(self, pos):
... return self.h5[self.key][pos][1], self.h5[self.key][pos][1] # where 1 is B
Expand All @@ -2119,14 +2122,18 @@ def __init__(self, f, filename, key, input_banks, target_banks, cache_size=3200,
>>> font_file = os.path.expanduser("~/.keras/datasets/fonts.hdf5")
>>> if os.path.exists(font_file):
... ds1 = H5Dataset(f, font_file, "fonts", 1, 1, name="Fonts", load_cache_direct=False,
... description='''
... Based on: https://erikbern.com/2016/01/21/analyzing-50k-fonts-using-deep-neural-networks.html
... ''')
... ds2 = H5Dataset(get_cache, font_file, "fonts", 1, 1, name="Fonts",
... description='''
... Based on: https://erikbern.com/2016/01/21/analyzing-50k-fonts-using-deep-neural-networks.html
... ''')
... ds1 = H5Dataset(f, font_file, "fonts", 1, 1, name="Fonts", load_cache_direct=False)
... ds2 = H5Dataset(get_cache, font_file, "fonts", 1, 1, name="Fonts", cache_size=32)
>>> try:
... import h5pyd
... except:
... h5pyd = None
>>> if h5pyd:
... ds3 = H5Dataset(get_cache, "fonts.public.hdfgroup.org", "fonts", 1, 1, name="Fonts", cache_size=32,
... endpoint="http://192.168.1.105:5000")
... assert len(ds.inputs) == 56443
"""
import h5py
Expand Down

0 comments on commit f785403

Please sign in to comment.