def __init__(self, hook_context, chk_scopename, graph_scopename):
    """Initialize the hook with chkp directory and scopenames.

    Args:
      hook_context: HookContext object containing hparams.
      chk_scopename: Base scopename of variables in the checkpoint being loaded
      graph_scopename: Base scopename of variables in current graph
    """
    self.checkpoint_path = hook_context.hparams.partial_load_checkpoint
    self.chk_scopename = chk_scopename
    self.graph_scopename = graph_scopename
Initialize the hook with chkp directory and scopenames.

    Args:
      hook_context: HookContext object containing hparams.
      chk_scopename: Base scopename of variables in the checkpoint being loaded
      graph_scopename: Base scopename of variables in current graph
    
tensor2tensor/utils/partial_checkpoint_load_hook.py