def Load():
"""Load the TopN ops library and return the loaded module."""
with _ops_lock:
global _topn_ops
if not _topn_ops:
ops_path = tf.resource_loader.get_path_to_datafile(TOPN_OPS_FILE)
tf.logging.info('data path: %s', ops_path)
_topn_ops = tf.load_op_library(ops_path)
assert _topn_ops, 'Could not load topn_ops.so'
return _topn_ops
评论列表
文章目录