Package com.github.neuralnetworks.training.backpropagation

Examples of com.github.neuralnetworks.training.backpropagation.BackpropagationAveragePooling2D.calculate()


  vp = new ValuesProvider();
  vp.addValues(c.getOutputLayer(), o);
  Matrix bpo = new Matrix(32, 2);
  vp.addValues(c.getInputLayer(), bpo);

  bp.calculate(connections, vp, c.getInputLayer());

  assertEquals(true, bpo.get(0, 0) == o.get(0, 0) / c.getSubsamplingRegionLength());
  assertEquals(true, bpo.get(1, 0) == o.get(0, 0) / c.getSubsamplingRegionLength());
  assertEquals(true, bpo.get(4, 0) == o.get(0, 0) / c.getSubsamplingRegionLength());
  assertEquals(true, bpo.get(5, 0) == o.get(0, 0) / c.getSubsamplingRegionLength());
View Full Code Here


  bp.setActivations(activations);

  ValuesProvider vp = TensorFactory.tensorProvider(c, 2, true);
  TensorFactory.copy(activations.get(c.getOutputLayer()), vp.get(c.getOutputLayer()));

  bp.calculate(connections, vp, c.getInputLayer());

  Tensor o = activations.get(c.getOutputLayer());
  Tensor bpo = vp.get(c.getInputLayer());
  assertEquals(true, bpo.get(0, 0, 0, 0) == o.get(0, 0, 0, 0) / c.getSubsamplingRegionLength());
  assertEquals(true, bpo.get(0, 0, 2, 0) == o.get(0, 0, 1, 0) / c.getSubsamplingRegionLength());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.