parameters: (file_name, tensor_name)
docstring: Prints tensors in a checkpoint file.
  
    If no `tensor_name` is provided, prints the tensor names and shapes
    in the checkpoint file.
  
    If `tensor_name` is provided, prints the content of the tensor.
  
    Args:
      file_name: Name of the checkpoint file.
      tensor_name: Name of the tensor in the checkpoint file to print.
docstring_summary: Prints tensors in a checkpoint file.
docstring_tokens: Prints tensors in a checkpoint file .
function: def print_tensors_in_checkpoint_file(file_name, tensor_name):
    """Prints tensors in a checkpoint file.
  
    If no `tensor_name` is provided, prints the tensor names and shapes
    in the checkpoint file.
  
    If `tensor_name` is provided, prints the content of the tensor.
  
    Args:
      file_name: Name of the checkpoint file.
      tensor_name: Name of the tensor in the checkpoint file to print.
    """
    try:
      if not tensor_name:
        variables = checkpoints.list_variables(file_name)
        for name, shape in variables:
          print("%s\t%s" % (name, str(shape)))
      else:
        print("tensor_name: ", tensor_name)
        print(checkpoints.load_variable(file_name, tensor_name))
    except Exception as e:  # pylint: disable=broad-except
      print(str(e))
      if "corrupted compressed block contents" in str(e):
        print("It's likely that your checkpoint file has been compressed "
              "with SNAPPY.")
function_tokens: def print_tensors_in_checkpoint_file ( file_name , tensor_name ) : try : if not tensor_name : variables = checkpoints . list_variables ( file_name ) for name , shape in variables : print ( "%s\t%s" % ( name , str ( shape ) ) ) else : print ( "tensor_name: " , tensor_name ) print ( checkpoints . load_variable ( file_name , tensor_name ) ) except Exception as e : # pylint: disable=broad-except print ( str ( e ) ) if "corrupted compressed block contents" in str ( e ) : print ( "It's likely that your checkpoint file has been compressed " "with SNAPPY." )