W3cubDocs

/TensorFlow Python

tf.load_op_library(library_filename)

tf.load_op_library(library_filename)

See the guide: Building Graphs > Utility functions

Loads a TensorFlow plugin, containing custom ops and kernels.

Pass "library_filename" to a platform-specific mechanism for dynamically loading a library. The rules for determining the exact location of the library are platform-specific and are not documented here. When the library is loaded, ops and kernels registered in the library via the REGISTER_* macros are made available in the TensorFlow process. Note that ops with the same name as an existing op are rejected and not registered with the process.

Args:

  • library_filename: Path to the plugin. Relative or absolute filesystem path to a dynamic library file.

Returns:

A python module containing the Python wrappers for Ops defined in the plugin.

Raises:

  • RuntimeError: when unable to load the library or get the python wrappers.

Defined in tensorflow/python/framework/load_library.py.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/load_op_library