Fix weights correction
This commit is contained in:
@@ -68,8 +68,9 @@ public class Main {
|
||||
Network network = new Network(List.of(layer));
|
||||
|
||||
TrainingContext context = new TrainingContext();
|
||||
context.dataset = dataSet;
|
||||
context.dataset = orDataSet;
|
||||
context.model = network;
|
||||
context.learningRate = 0.3F;
|
||||
|
||||
List<TrainingStep> steps = List.of(
|
||||
new PredictionStep(),
|
||||
@@ -81,8 +82,8 @@ public class Main {
|
||||
|
||||
TrainingPipeline pipeline = new TrainingPipeline(steps);
|
||||
pipeline
|
||||
.stopCondition(ctx -> ctx.globalLoss == 0 && ctx.epoch >= 1000)
|
||||
.afterEpoch(ctx -> ctx.globalLoss = 0)
|
||||
.stopCondition(ctx -> ctx.globalLoss == 0.0F || ctx.epoch > 100)
|
||||
.beforeEpoch(ctx -> ctx.globalLoss = 0)
|
||||
.withVerbose(true)
|
||||
.run(context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user