def sg_print(tensor_list):
    r"""Simple tensor printing function for debugging.
    Prints the value, shape, and data type of each tensor in the list.
    
    Args:
      tensor_list: A list/tuple of tensors or a single tensor.
      
    Returns:
      The value of the tensors.
      
    For example,
    
    ```python
    import sugartensor as tf
    a = tf.constant([1.])
    b = tf.constant([2.])
    out = tf.sg_print([a, b])
    # Should print [ 1.] (1,) float32
    #              [ 2.] (1,) float32
    print(out)
    # Should print [array([ 1.], dtype=float32), array([ 2.], dtype=float32)]
    ``` 
    """
    # to list
    if type(tensor_list) is not list and type(tensor_list) is not tuple:
        tensor_list = [tensor_list]

    # evaluate tensor list with queue runner
    with tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) as sess:
        sg_init(sess)
        with tf.sg_queue_context():
            res = sess.run(tensor_list)
            for r in res:
                print(r, r.shape, r.dtype)

    if len(res) == 1:
        return res[0]
    else:
        return res
def sg_print ( tensor_list ) : if type ( tensor_list ) is not list and type ( tensor_list ) is not tuple : tensor_list = [ tensor_list ] with tf . Session ( config = tf . ConfigProto ( allow_soft_placement = True ) ) as sess : sg_init ( sess ) with tf . sg_queue_context ( ) : res = sess . run ( tensor_list ) for r in res : print ( r , r . shape , r . dtype ) if len ( res ) == 1 : return res [ 0 ] else : return res
r"""Simple tensor printing function for debugging.
    Prints the value, shape, and data type of each tensor in the list.
    
    Args:
      tensor_list: A list/tuple of tensors or a single tensor.
      
    Returns:
      The value of the tensors.
      
    For example,
    
    ```python
    import sugartensor as tf
    a = tf.constant([1.])
    b = tf.constant([2.])
    out = tf.sg_print([a, b])
    # Should print [ 1.] (1,) float32
    #              [ 2.] (1,) float32
    print(out)
    # Should print [array([ 1.], dtype=float32), array([ 2.], dtype=float32)]
    ```