moze teraz2

This commit is contained in:
ZarebaMichal 2022-05-23 16:30:54 +02:00
parent 13ffa2dade
commit aad2882e8d
2 changed files with 724 additions and 724 deletions

View File

@ -32,7 +32,7 @@ class ANNHyperModel(HyperModel):
# Tune the number of units in the first Dense layer
# Choose an optimal value between 32-512
hp_units1 = hp.Int('units1', min_value=100, max_value=1024, step=32)
hp_units2 = hp.Int('units2', min_value=32, max_value=512, step=32)
hp_units2 = hp.Int('units2', min_value=32, max_value=1024, step=32)
hp_units3 = hp.Int('units3', min_value=32, max_value=512, step=32)
hp_units4 = hp.Int('units4', min_value=32, max_value=512, step=32)
hp_units5 = hp.Int('units5', min_value=32, max_value=512, step=32)
@ -71,7 +71,7 @@ hypermodel = ANNHyperModel()
tuner = kt.Hyperband(
hypermodel,
objective='mean_squared_error',
max_epochs=80,
max_epochs=100,
factor=3,
directory='keras_tuner_dir',
project_name='keras_tuner_demo2'
@ -79,7 +79,7 @@ tuner = kt.Hyperband(
#po#ly = PolynomialFeatures(2, interaction_only=True)
#x = poly.fit_transform(x)
tuner.search(x, y, epochs=80)
tuner.search(x, y, epochs=100)
for h_param in [f"units{i}" for i in range(1,4)] + ['learning_rate']:
print(h_param, tuner.get_best_hyperparameters()[0].get(h_param))
@ -91,7 +91,7 @@ best_model.summary()
best_model.fit(
x,
y,
epochs=80,
epochs=100,
batch_size=64
)
x_test = pd.read_csv("test-A/in.tsv", sep="\t", names=in_columns)

File diff suppressed because it is too large Load Diff