def lead_to_sample():
    x, y = load_data()
    x, y, x_test, y_test = utils.split_data(x, y, conf.train_ratio)
    x = x.reshape(-1, 5000, 1)
    y = np.repeat(y, 12)
    print('x.shape,y.shape', x.shape, y.shape)
    print('x_test.shape,y_test.shape', x_test.shape, y_test.shape)
    return x, y, x_test, y_test
Example #2
0
def train():
    x, y = load_data()
    x = x.transpose([0, 2, 1])
    x = np.expand_dims(x, 3)
    # x = np.tile(x,[1,1,3])
    print(x.shape)
    input_x, out = choose_model()
    model_compiled = compile_model(input_x, out)
    train_model(x, y, model_compiled)
def train():
    x, y = load_data()
    x = x[:, :, 1]
    print(x.shape)
    x = utils.seg_signal(x, conf.seq_len, conf.seg_len)
    print('x_seg.shape:', x.shape)
    channel = int(conf.seq_len / conf.seg_len)
    input_x = Input([conf.seg_len, channel])
    out = choose_model(input_x)
    model_compiled = compile_model(input_x, out)
    train_model(x, y, model_compiled)
Example #4
0
def train():
    x, y = load_data()
    input_x, out = choose_model()
    model_compiled = compile_model(input_x, out)
    train_model(x, y, model_compiled)
def train_lead_as_channel():
    x, y = load_data()
    input_x = Input([conf.seq_len, conf.num_lead])
    out = choose_model(input_x)
    model_compiled = compile_model(input_x, out)
    train_model(x, y, model_compiled)
def train_tmp():
    x, y = load_data()
    input_x = Input([5000, 12])
    out = choose_model(input_x)
    model_compiled = compile_model(input_x, out)
    train_model(x, y, model_compiled)