Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use BigDL to achieve early stop function #10853

Open
gdg1212 opened this issue Apr 23, 2024 · 1 comment
Open

How to use BigDL to achieve early stop function #10853

gdg1212 opened this issue Apr 23, 2024 · 1 comment

Comments

@gdg1212
Copy link

gdg1212 commented Apr 23, 2024

val model = Sequential[Float]()
  .add(Dense(50, inputShape = Shape(inputSize)))
  .add(Activation("relu"))
  .add(Dense(25))
  .add(Activation("relu"))
  .add(Dense(1))
val optimizer = Optimizer(model = model,
  sampleRDD = trainingTensor.map(_._2),
  criterion = MSECriterion[Float](),
  batchSize = 150000)


 optimizer
   .setOptimMethod(new Adam(0.001))
   .setEndWhen(Trigger.maxEpoch(100))
    .optimize()
@qiuxin2012
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants