mode='min', baseline=None) # 早停参数 params = dict(cv=5, epochs=500, batch_size=32, kfold_index=kfold_index, cb=[cb]) config.extent(params) channels_names = ['scores7', 'conservation', 'sequence_feature', 'splicing'] (x_train, y_train), (x_test, y_test), (x_test_1, y_test_1), (x_test_2, y_test_2) = data.get_channels(channels_names) # 模型搭建 model_file_cv = [ r'./models/scores7/cv{}.h5', r'./models/conservation/cv{}.h5', r'./models/sequence_feature/cv{}.h5', r'./models/splicing/cv{}.h5' ] config1 = { "lr": 1e-04, "ut_1": 1024, "l1": 0.0, "ut_2": 256, "l2": 0.00, "dp": 0.0, 'a': 'leaky_relu',
import matplotlib.pyplot as plt from core.utils import get_kfold_index from core.data import Data from core.app_config import AppConfig from core.scoring import scob matplotlib.use('Agg') param = { "lr": 1e-04, "ut_1": 1024, "l1": 0.0, "ut_2": 256, "l2": 0.00, "dp": 0.0, 'a': 'leaky_relu', 'inputs_shape': (7, ) } model = build_sub_model_1(**param) data = Data() (x_train, y_train), (x_test, y_test), (x_test_1, y_test_1), (x_test_2, y_test_2) = data.get_channels( ['sequence_feature']) model.fit(x_train[0], y_train, validation_split=0.2, batch_size=32, epochs=50) score = scob.get_scores(y_test_2[:, 1], model.predict(x_test_2)[:, 1]) print(score)