src/core/train.py
def check_inputs(x_unlabeled, x_labeled, y_labeled, y_true):
    '''
    Checks the data inputs to both train_step and predict and creates
    empty arrays if necessary
    '''
    if x_unlabeled is None:
        if x_labeled is None:
            raise Exception("No data, labeled or unlabeled, passed to check_inputs!")
        x_unlabeled = x_labeled[0:0]
    if x_labeled is not None and y_labeled is not None:
        pass
    elif x_labeled is None and y_labeled is None:
        x_labeled = x_unlabeled[0:0]
        y_shape = y_true.get_shape()[1:K.ndim(y_true)].as_list()
        y_labeled = np.empty([0] + y_shape)
    else:
        raise Exception("x_labeled and y_labeled must both be None or have a value")
    return x_unlabeled, x_labeled, y_labeled

    Checks the data inputs to both train_step and predict and creates
    empty arrays if necessary
    
Checks the data inputs to both train_step and predict and creates
empty arrays if necessary
Checks the data inputs to both train_step and predict and creates empty arrays if necessary
def check_inputs(x_unlabeled, x_labeled, y_labeled, y_true):
    if x_unlabeled is None:
        if x_labeled is None:
            raise Exception("No data, labeled or unlabeled, passed to check_inputs!")
        x_unlabeled = x_labeled[0:0]
    if x_labeled is not None and y_labeled is not None:
        pass
    elif x_labeled is None and y_labeled is None:
        x_labeled = x_unlabeled[0:0]
        y_shape = y_true.get_shape()[1:K.ndim(y_true)].as_list()
        y_labeled = np.empty([0] + y_shape)
    else:
        raise Exception("x_labeled and y_labeled must both be None or have a value")
    return x_unlabeled, x_labeled, y_labeled
def check_inputs ( x_unlabeled , x_labeled , y_labeled , y_true ) : if x_unlabeled is None : if x_labeled is None : raise Exception ( "No data, labeled or unlabeled, passed to check_inputs!" ) x_unlabeled = x_labeled [ 0 : 0 ] if x_labeled is not None and y_labeled is not None : pass elif x_labeled is None and y_labeled is None : x_labeled = x_unlabeled [ 0 : 0 ] y_shape = y_true . get_shape ( ) [ 1 : K . ndim ( y_true ) ] . as_list ( ) y_labeled = np . empty ( [ 0 ] + y_shape ) else : raise Exception ( "x_labeled and y_labeled must both be None or have a value" ) return x_unlabeled , x_labeled , y_labeled
Checks the data inputs to both train_step and predict and creates
empty arrays if necessary
Checks the data inputs to both train_step and predict and creates empty arrays if necessary
'''
    Checks the data inputs to both train_step and predict and creates
    empty arrays if necessary
    '''
x_unlabeled
x_labeled
y_labeled
y_true