Get shape of variable.
    Return type is tuple.

def shape(tensor):
    '''
    Get shape of variable.
    Return type is tuple.
    '''
    temp_s = tensor.get_shape()
    return tuple([temp_s[i].value for i in range(0, len(temp_s))])