{ "info": { "author": "ghcollin", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "`tftables `_ allows convenient access to HDF5 files with Tensorflow.\nA class for reading batches of data out of arrays or tables is provided.\nA secondary class wraps both the primary reader and a Tensorflow FIFOQueue for straight-forward streaming \nof data from HDF5 files into Tensorflow operations.\n\nThe library is backed by `multitables `_ for high-speed reading of HDF5\ndatasets. ``multitables`` is based on PyTables (``tables``), so this library can make use of any compression algorithms\nthat PyTables supports.\n\nLicence\n=======\n\nThis software is distributed under the MIT licence. \nSee the `LICENSE.txt `_ file for details.\n\nInstallation\n============\n\n::\n\n pip install tftables\n\nAlternatively, to install from HEAD, run\n\n::\n\n pip install git+https://github.com/ghcollin/tftables.git\n\nYou can also `download `_\nor `clone the repository `_ and run\n\n::\n\n python setup.py install\n\n``tftables`` depends on ``multitables``, ``numpy`` and ``tensorflow``. The package is compatible with the latest versions of python\n2 and 3.\n\nQuick start\n===========\n\nAn example of accessing a table in a HDF5 file.\n\n.. code:: python\n\n import tftables\n import tensorflow as tf\n\n with tf.device('/cpu:0'):\n # This function preprocesses the batches before they\n # are loaded into the internal queue.\n # You can cast data, or do one-hot transforms.\n # If the dataset is a table, this function is required.\n def input_transform(tbl_batch):\n labels = tbl_batch['label']\n data = tbl_batch['data']\n\n truth = tf.to_float(tf.one_hot(labels, num_labels, 1, 0))\n data_float = tf.to_float(data)\n\n return truth, data_float\n\n # Open the HDF5 file and create a loader for a dataset.\n # The batch_size defines the length (in the outer dimension)\n # of the elements (batches) returned by the reader.\n # Takes a function as input that pre-processes the data.\n loader = tftables.load_dataset(filename='path/to/h5_file.h5',\n dataset_path='/internal/h5/path',\n input_transform=input_transform,\n batch_size=20)\n\n # To get the data, we dequeue it from the loader.\n # Tensorflow tensors are returned in the same order as input_transformation\n truth_batch, data_batch = loader.dequeue()\n\n # The placeholder can then be used in your network\n result = my_network(truth_batch, data_batch)\n\n with tf.Session() as sess:\n\n # This context manager starts and stops the internal threads and\n # processes used to read the data from disk and store it in the queue.\n with loader.begin(sess):\n for _ in range(num_iterations):\n sess.run(result)\n\n\nIf the dataset is an array instead of a table. Then ``input_transform`` can be omitted\nif no pre-processing is required. If only a single pass through the dataset is desired,\nthen you should pass ``cyclic=False`` to ``load_dataset``.\n\n\nExamples\n========\n\nSee the `unit tests `_ for complete examples.\n\nExamples\n========\n\nSee the `how-to `_ for more in-depth documentation, and the\n`unit tests `_ for complete examples.\n\nDocumentation\n=============\n\n`Online documentation `_ is available.\nA `how to `_ gives a basic overview of the library.\n\nOffline documentation can be built from the ``docs`` folder using ``sphinx``.\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ghcollin/tftables", "keywords": "tensorflow HDF5", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tftables", "package_url": "https://pypi.org/project/tftables/", "platform": "", "project_url": "https://pypi.org/project/tftables/", "project_urls": { "Homepage": "https://github.com/ghcollin/tftables" }, "release_url": "https://pypi.org/project/tftables/1.1.2/", "requires_dist": [ "multitables", "numpy (!=1.10.1)", "tensorflow" ], "requires_python": "", "summary": "Interface for reading HDF5 files into Tensorflow.", "version": "1.1.2" }, "last_serial": 3586176, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "e5c922c3c75b135c8b7622d4447c8a71", "sha256": "5c871f18b59c4ec69a63030be6bfffb20d797f5132beae08d183336dc3c50ecb" }, "downloads": -1, "filename": "tftables-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5c922c3c75b135c8b7622d4447c8a71", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12622, "upload_time": "2017-03-07T23:09:30", "url": "https://files.pythonhosted.org/packages/e2/1b/959f74fa6138ccac4bd31a97becec502a76eecab44b252756f497342f3cb/tftables-1.1.0-py2.py3-none-any.whl" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "32891afbdb76e1833676f40fb1ca8007", "sha256": "fe74647f928e79fec9ab3d88bec9be2c72825e098cd89bd2046549c535f34324" }, "downloads": -1, "filename": "tftables-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "32891afbdb76e1833676f40fb1ca8007", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12729, "upload_time": "2017-03-08T07:50:11", "url": "https://files.pythonhosted.org/packages/68/b3/bd11c71ce1a73ac1baa0efc4e19434cd80c086d6c9a8b7b08d871fee1544/tftables-1.1.1-py2.py3-none-any.whl" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "dad740af62f20caa901bee1264534a13", "sha256": "794aebe35618adbfe8e1f2e8adef1c71c85acabe9aa5112cb5c542d1a1bf98ef" }, "downloads": -1, "filename": "tftables-1.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dad740af62f20caa901bee1264534a13", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12420, "upload_time": "2018-02-16T03:17:56", "url": "https://files.pythonhosted.org/packages/e8/bc/7be1e26747cea5db241480ad84bafff93fbb6db4f502bc916bd89d8ecdcf/tftables-1.1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dad740af62f20caa901bee1264534a13", "sha256": "794aebe35618adbfe8e1f2e8adef1c71c85acabe9aa5112cb5c542d1a1bf98ef" }, "downloads": -1, "filename": "tftables-1.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dad740af62f20caa901bee1264534a13", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12420, "upload_time": "2018-02-16T03:17:56", "url": "https://files.pythonhosted.org/packages/e8/bc/7be1e26747cea5db241480ad84bafff93fbb6db4f502bc916bd89d8ecdcf/tftables-1.1.2-py2.py3-none-any.whl" } ] }