def lstm_with_static_feature_model_experiments(result_file):
    if ExperimentSetup.data_source == 'lu':
        data_set = read_data_lu()
    else:
        data_set = read_data_sun()
    static_feature = data_set.static_feature
    dynamic_feature = data_set.dynamic_feature
    labels = data_set.labels

    static_n_features = static_feature.shape[1]
    dynamic_n_features = dynamic_feature.shape[2]
    time_steps = dynamic_feature.shape[1]
    n_output = labels.shape[1]

    model = LSTMWithStaticFeature(
        static_n_features,
        dynamic_n_features,
        time_steps,
        ExperimentSetup.lstm_size,
        n_output,
        batch_size=ExperimentSetup.batch_size,
        optimizer=tf.train.AdamOptimizer(ExperimentSetup.learning_rate),
        epochs=ExperimentSetup.epochs,
        output_n_epochs=ExperimentSetup.output_n_epochs)
    return model_experiments(model, data_set, result_file)
def resnet_model_experiments(result_file):
    if ExperimentSetup.data_source == 'lu':
        data_set = read_data_lu()
    else:
        data_set = read_data_sun()
    static_feature = data_set.static_feature
    labels = data_set.labels

    static_n_features = static_feature.shape[1]
    n_output = labels.shape[1]

    model = ResNet(static_n_features,
                   n_output,
                   batch_size=ExperimentSetup.batch_size,
                   optimizer=tf.train.AdamOptimizer(
                       ExperimentSetup.learning_rate),
                   epochs=ExperimentSetup.epochs,
                   output_n_epochs=ExperimentSetup.output_n_epochs)
    return model_experiments(model, data_set, result_file)
def bidirectional_lstm_model_experiments(result_file):
    if ExperimentSetup.data_source == 'lu':
        data_set = read_data_lu()
    else:
        data_set = read_data_sun()
    dynamic_feature = data_set.dynamic_feature
    labels = data_set.labels

    num_features = dynamic_feature.shape[2]
    time_steps = dynamic_feature.shape[1]
    n_output = labels.shape[1]

    model = BidirectionalLSTMModel(
        num_features,
        time_steps,
        ExperimentSetup.lstm_size,
        n_output,
        batch_size=ExperimentSetup.batch_size,
        optimizer=tf.train.AdamOptimizer(ExperimentSetup.learning_rate),
        epochs=ExperimentSetup.epochs,
        output_n_epoch=ExperimentSetup.output_n_epochs)
    return model_experiments(model, data_set, result_file)