-
Notifications
You must be signed in to change notification settings - Fork 0
/
autokeras_diff.patch
35 lines (33 loc) · 1.5 KB
/
autokeras_diff.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/autokeras/autokeras/graph.py b/autokeras/autokeras/graph.py
--- a/autokeras/autokeras/graph.py
+++ b/autokeras/autokeras/graph.py
@@ -279,16 +279,14 @@ class Graph(keras_tuner.HyperModel, serializable.Serializable):
def _compile_keras_model(self, hp, model):
# Specify hyperparameters from compile(...)
- optimizer_name = hp.Choice(
+ optimizer_name = hp.Fixed(
"optimizer",
- ["adam", "sgd", "adam_weight_decay"],
- default="adam",
+ value='adam',
)
# TODO: add adadelta optimizer when it can optimize embedding layer on GPU.
- learning_rate = hp.Choice(
- "learning_rate", [1e-1, 1e-2, 1e-3, 1e-4, 2e-5, 1e-5], default=1e-3
+ learning_rate = hp.Fixed(
+ "learning_rate", value=1E-3,
)
-
if optimizer_name == "adam":
optimizer = tf.keras.optimizers.Adam(learning_rate=learning_rate)
elif optimizer_name == "sgd":
diff --git a/autokeras/autokeras/tuners/greedy.py b/autokeras/autokeras/tuners/greedy.py
--- a/autokeras/autokeras/tuners/greedy.py
+++ b/autokeras/autokeras/tuners/greedy.py
@@ -96,6 +96,7 @@ class GreedyOracle(keras_tuner.Oracle):
super().__init__(seed=seed, **kwargs)
self.initial_hps = initial_hps or []
self._tried_initial_hps = [False] * len(self.initial_hps)
+ self._max_collisions = 100; print('self._max_collisions set to 100')
def get_state(self):
state = super().get_state()