def Load(library_base_dir=''):
"""Load the quantized ops library and return the loaded module."""
with _ops_lock:
global _quantized_ops
if not _quantized_ops:
data_files_path = os.path.join(library_base_dir,
tf.resource_loader.get_data_files_path())
tf.logging.info('q:data path: %s', data_files_path)
_quantized_ops = tf.load_op_library(os.path.join(
data_files_path, QUANTIZED_OPS_FILE))
assert _quantized_ops, 'Could not load quantized_ops.so'
return _quantized_ops
评论列表
文章目录