Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit e1f0acb

Browse files
authored
Updating parameters to match current ArgumentParser version. (#660)
1 parent a1a61d9 commit e1f0acb

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

CycleGAN/CLI.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ struct Options: ParsableArguments {
1818
@Option(help: ArgumentHelp("Path to the dataset folder", valueName: "dataset-path"))
1919
var datasetPath: String?
2020

21-
@Option(default: 50, help: ArgumentHelp("Number of epochs", valueName: "epochs"))
22-
var epochs: Int
21+
@Option(help: ArgumentHelp("Number of epochs", valueName: "epochs"))
22+
var epochs: Int = 50
2323

24-
@Option(default: 20, help: ArgumentHelp("Number of steps to log a sample image into tensorboard", valueName: "sampleLogPeriod"))
25-
var sampleLogPeriod: Int
24+
@Option(help: ArgumentHelp("Number of steps to log a sample image into tensorboard", valueName: "sampleLogPeriod"))
25+
var sampleLogPeriod: Int = 20
2626
}

Examples/Fractals/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ struct FractalCommand: ParsableCommand {
3030
extension FractalCommand {
3131
struct Parameters: ParsableArguments {
3232
@Flag(help: "Use eager backend.")
33-
var eager: Bool
33+
var eager: Bool = false
3434

3535
@Flag(help: "Use X10 backend.")
36-
var x10: Bool
36+
var x10: Bool = false
3737

3838
@Option(help: "Number of iterations to run.")
3939
var iterations: Int?

pix2pix/CLI.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ struct Options: ParsableArguments {
1818
@Option(help: ArgumentHelp("Path to the dataset folder", valueName: "dataset-path"))
1919
var datasetPath: String?
2020

21-
@Option(default: 1, help: ArgumentHelp("Number of epochs", valueName: "epochs"))
22-
var epochs: Int
21+
@Option(help: ArgumentHelp("Number of epochs", valueName: "epochs"))
22+
var epochs: Int = 1
2323

24-
@Option(default: 20, help: ArgumentHelp("Number of steps to log a sample image into tensorboard", valueName: "sampleLogPeriod"))
25-
var sampleLogPeriod: Int
24+
@Option(help: ArgumentHelp("Number of steps to log a sample image into tensorboard", valueName: "sampleLogPeriod"))
25+
var sampleLogPeriod: Int = 20
2626
}

0 commit comments

Comments
 (0)