tf.resource_loader.get_path_to_datafile
Stay organized with collections
Save and categorize content based on your preferences.
Get the path to the specified file in the data dependencies.
tf.resource_loader.get_path_to_datafile(
path
)
The path is relative to tensorflow/
Args |
path
|
a string resource path relative to tensorflow/
|
Returns |
The path to the specified file present in the data attribute of py_test
or py_binary.
|
Raises |
IOError
|
If the path is not found, or the resource can't be opened.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.resource_loader.get_path_to_datafile\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/platform/resource_loader.py#L100-L117) |\n\nGet the path to the specified file in the data dependencies.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.resource_loader.get_path_to_datafile`](/api_docs/python/tf/compat/v1/resource_loader/get_path_to_datafile)\n\n\u003cbr /\u003e\n\n tf.resource_loader.get_path_to_datafile(\n path\n )\n\nThe path is relative to tensorflow/\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|------------------------------------------------|\n| `path` | a string resource path relative to tensorflow/ |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The path to the specified file present in the data attribute of py_test or py_binary. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|-----------|------------------------------------------------------------|\n| `IOError` | If the path is not found, or the resource can't be opened. |\n\n\u003cbr /\u003e"]]