graph_utils.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:automatic-summarization 作者: mozilla 项目源码 文件源码
def templatemethod(name_):
  """This decorator wraps a method with `tf.make_template`. For example,

  @templatemethod
  def my_method():
    # Create variables
  """

  def template_decorator(func):
    """Inner decorator function"""

    def func_wrapper(*args, **kwargs):
      """Inner wrapper function"""
      templated_func = tf.make_template(name_, func)
      return templated_func(*args, **kwargs)

    return func_wrapper

  return template_decorator
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号