答:把 Parameter 声明成 FlowSpec 类属性,例如 epochs = Parameter("epochs", type=int, default=3)。运行时可以传 --epochs 5,步骤里用 self.epochs 读取。
题干与完整题解免费阅读第 1 / 1 页
本页 1 道,共 1 道浏览其他领域
答:把 Parameter 声明成 FlowSpec 类属性,例如 epochs = Parameter("epochs", type=int, default=3)。运行时可以传 --epochs 5,步骤里用 self.epochs 读取。