Skip to content

Commit

Permalink
Do not override the optimizer's default parameters
Browse files Browse the repository at this point in the history
As discussed in kiudee#119. The
reasoning is that we don't have good reason to override those, the
library user will likely have to tune them anyways (or use a different
optimizer altogether). At the same time, they make the design proposed
in kiudee#119 (passing uninitialized optimizers and their parameters
separately) more difficult.
  • Loading branch information
timokau committed Jun 10, 2020
1 parent 504e689 commit f0bfc98
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion csrank/choicefunction/cmpnet_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/choicefunction/fate_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(
activation="selu",
kernel_initializer="lecun_normal",
kernel_regularizer=l2(0.01),
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
batch_size=256,
metrics=None,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/choicefunction/feta_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="selu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/choicefunction/ranknet_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/core/cmpnet_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/core/fate_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
activation="selu",
kernel_initializer="lecun_normal",
kernel_regularizer=l2(0.01),
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
batch_size=256,
random_state=None,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion csrank/core/feta_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="selu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=None,
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/core/ranknet_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/discretechoice/cmpnet_discrete_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/discretechoice/fate_discrete_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
activation="selu",
kernel_initializer="lecun_normal",
kernel_regularizer=l2(0.01),
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
batch_size=256,
random_state=None,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion csrank/discretechoice/feta_discrete_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="selu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["categorical_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/discretechoice/ranknet_discrete_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/objectranking/cmp_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/objectranking/fate_object_ranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
activation="selu",
kernel_initializer="lecun_normal",
kernel_regularizer=l2(0.01),
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
batch_size=256,
loss_function=hinged_rank_loss,
metrics=[zero_one_rank_loss_for_scores_ties],
Expand Down
2 changes: 1 addition & 1 deletion csrank/objectranking/feta_object_ranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="selu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=None,
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/objectranking/list_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
activation="selu",
kernel_initializer="lecun_normal",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=[zero_one_rank_loss_for_scores_ties],
batch_size=256,
random_state=None,
Expand Down
2 changes: 1 addition & 1 deletion csrank/objectranking/rank_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
kernel_regularizer=l2(1e-4),
kernel_initializer="lecun_normal",
activation="relu",
optimizer=SGD(lr=1e-4, nesterov=True, momentum=0.9),
optimizer=SGD(),
metrics=["binary_accuracy"],
batch_size=256,
random_state=None,
Expand Down

0 comments on commit f0bfc98

Please sign in to comment.