basic_utils/utils.py
def turn_into_cuda(var):
    """
    Change a variable or tensor into cuda.

    Args:
        var: the variable to be changed

    Return:
        the changed variable
    """
    return var.cuda() if use_cuda else var

    Change a variable or tensor into cuda.

    Args:
        var: the variable to be changed

    Return:
        the changed variable
    
Change a variable or tensor into cuda.
Change a variable or tensor into cuda .
def turn_into_cuda(var):
    return var.cuda() if use_cuda else var
def turn_into_cuda ( var ) : return var . cuda ( ) if use_cuda else var
Change a variable or tensor into cuda.
Change a variable or tensor into cuda .
"""
    Change a variable or tensor into cuda.

    Args:
        var: the variable to be changed

    Return:
        the changed variable
    """
var
the variable to be changed
the variable to be changed