Skip to content

Commit

Permalink
parse new arguments to mnist.py
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Mittal <[email protected]>
  • Loading branch information
shashank-iitbhu committed Sep 10, 2024
1 parent 4a5131d commit 1a7a831
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/v1beta1/hp-tuning/hyperopt-distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ spec:
objectiveMetricName: loss
algorithm:
algorithmName: random
parallelTrialCount: 5
maxTrialCount: 20
maxFailedTrialCount: 5
parallelTrialCount: 3
maxTrialCount: 12
maxFailedTrialCount: 3
parameters:
# - name: lr
# parameterType: double
Expand All @@ -39,6 +39,7 @@ spec:
feasibleSpace:
min: "0.1"
max: "0.5"
step: "0.001"
distribution: "logNormal"
trialTemplate:
primaryContainerName: training-container
Expand Down
14 changes: 14 additions & 0 deletions examples/v1beta1/trial-images/pytorch-mnist/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@ def main():
metavar="M",
help="SGD momentum (default: 0.5)",
)
parser.add_argument(
"--weight-decay",
type=float,
default=0.01,
metavar="WD",
help="Weight decay for regularization (default: 0.01)",
)
parser.add_argument(
"--dropout-rate",
type=float,
default=0.5,
metavar="DR",
help="Dropout rate for the model (default: 0.5)",
)
parser.add_argument(
"--no-cuda", action="store_true", default=False, help="disables CUDA training"
)
Expand Down

0 comments on commit 1a7a831

Please sign in to comment.