Skip to content

Commit c114c62

Browse files
authored
test coverage
1 parent 3803789 commit c114c62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autokeras/graph.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ def _compile_keras_model(self, hp, model):
296296
elif optimizer_name == "sgd":
297297
optimizer = keras.optimizers.SGD(learning_rate=learning_rate)
298298
elif optimizer_name == "adam_weight_decay":
299-
steps_per_epoch = max(1, int(self.num_samples / 32))
299+
steps_per_epoch = max(
300+
1, int(self.num_samples / (self.batch_size or 32))
301+
)
300302
num_train_steps = steps_per_epoch * self.epochs
301303

302304
lr_schedule = keras.optimizers.schedules.PolynomialDecay(

0 commit comments

Comments
 (0)