Esempio n. 1
0
    def input_fn_eval():
        if flags_obj.encode_method == 'kmer':
            input_fn = input_function_train_kmer(flags_obj.input_tfrec, 1,
                                                 flags_obj.batch_size,
                                                 flags_obj.cpus)
        else:
            input_fn = input_function_train_one_hot(flags_obj.input_tfrec, 1,
                                                    flags_obj.batch_size,
                                                    flags_obj.cpus)

        return input_fn
Esempio n. 2
0
    def input_fn_eval():
        if flags_obj.encode_method == 'kmer':
            input_fn = input_function_train_kmer(flags_obj.input_tfrec, 1,
                                                 flags_obj.batch_size,
                                                 flags_obj.cpus)
            if flags_obj.model_name in [
                    'embed_pool', 'embed_cnn', 'embed_lstm',
                    'embed_cnn_no_pool'
            ]:
                input_fn = input_function_train_kmer_pad_to_fixed_len(
                    flags_obj.input_tfrec, 1, flags_obj.batch_size,
                    flags_obj.cpus, flags_obj.max_len, flags_obj.kmer)
        else:
            input_fn = input_function_train_one_hot(flags_obj.input_tfrec, 1,
                                                    flags_obj.batch_size,
                                                    flags_obj.cpus,
                                                    flags_obj.max_len)

        return input_fn