{ "info": { "author": "Stefan Webb", "author_email": "stefan.webb@eng.ox.ac.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], "description": "tensorflow-utils\n===================\nThis library contains classes and methods to make using TensorFlow easier.\n\nAt the moment it only contains context managers for creating graphs and session.\n\nInstallation\n------------\n**User Install**\n\n.. code-block:: bash\n\n pip install --user tensorflow-utils\n\n**Developer Install**\n\n.. code-block:: bash\n\n git clone https://github.com/stefanwebb/tensorflow-utils.git\n cd tensorflow-utils\n python setup.py develop\n\nCreating graphs\n------------\nAfter importing the library,\n\n.. code-block:: python\n\n import tensorflow_utils as tf_utils\n\nwe enter a context manager for a new graph as,\n\n.. code-block:: python\n\n with tf_utils.contexts.GraphContext() as graph_context:\n\nThis context manager takes a number of useful arguments for a default device, random seeds to NumPy and TensorFlow, and an existing graph object. For example,\n\n.. code-block:: python\n\n with tf_utils.contexts.GraphContext(graph=existing_graph) as graph_context:\n with tf_utils.contexts.GraphContext(device='gpu:0') as graph_context:\n with tf_utils.contexts.GraphContext(device='gpu:0', np_seed=1, tf_seed=2) as graph_context:\n\nCreating sessions\n------------\nCreating sessions is likewise as simple with the following context manager,\n\n.. code-block:: python\n\n with tf_utils.contexts.SessionContext() as session_context:\n\nIt has a number of useful keyword parameter options,\n\n.. code-block:: python\n\n with tf_utils.contexts.SessionContext(\n soft_placement=True, \n gpu_allow_growth=True,\n gpu_restrict_devices=0) as session_context:\n\nUsing the session manager has a number of benefits,\n\n- global and local variables are initialized after entering the manager\n- a ``tf.train.Saver`` is created if trainable variables have been defined in the current graph\n- queue runners are started and the queue populated if they have been defined in the graph, and these threads are terminated when the manager is exited\n- stopping queue runners with the ``stop()`` method, and testing whether they are running with ``running()``\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/stefanwebb/tensorflow-utils", "keywords": "tensorflow utils", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tensorflow-utils", "package_url": "https://pypi.org/project/tensorflow-utils/", "platform": "", "project_url": "https://pypi.org/project/tensorflow-utils/", "project_urls": { "Homepage": "https://github.com/stefanwebb/tensorflow-utils" }, "release_url": "https://pypi.org/project/tensorflow-utils/0.1.0/", "requires_dist": [ "enum34", "numpy", "scipy", "six", "check-manifest; extra == 'dev'", "coverage; extra == 'test'" ], "requires_python": "", "summary": "Classes and methods to make using TensorFlow easier", "version": "0.1.0" }, "last_serial": 3081801, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "168b8d8d0e673258992f38d01285715c", "sha256": "d517e7ca367300b5ff2f35981bbe09f93600e4949de6c37dc160163f99409a9a" }, "downloads": -1, "filename": "tensorflow_utils-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "168b8d8d0e673258992f38d01285715c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7959, "upload_time": "2017-08-08T16:52:41", "url": "https://files.pythonhosted.org/packages/03/8f/5a3563b1baeb3c967a6f416f9558884c65a64949623164cb52ce36bcc1be/tensorflow_utils-0.1.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "168b8d8d0e673258992f38d01285715c", "sha256": "d517e7ca367300b5ff2f35981bbe09f93600e4949de6c37dc160163f99409a9a" }, "downloads": -1, "filename": "tensorflow_utils-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "168b8d8d0e673258992f38d01285715c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7959, "upload_time": "2017-08-08T16:52:41", "url": "https://files.pythonhosted.org/packages/03/8f/5a3563b1baeb3c967a6f416f9558884c65a64949623164cb52ce36bcc1be/tensorflow_utils-0.1.0-py2.py3-none-any.whl" } ] }