Examples of addValues()


Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  connections.add(c2);
  connections.add(bc);

  vp = new ValuesProvider();
  vp.addValues(c1.getOutputLayer(), i1);
  vp.addValues(c2.getOutputLayer(), i2);
  vp.addValues(ol, o);

  aws = new AparapiWeightedSumConnectionCalculator();
  aws.calculate(connections, vp, ol);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  connections.add(bc);

  vp = new ValuesProvider();
  vp.addValues(c1.getOutputLayer(), i1);
  vp.addValues(c2.getOutputLayer(), i2);
  vp.addValues(ol, o);

  aws = new AparapiWeightedSumConnectionCalculator();
  aws.calculate(connections, vp, ol);

  assertEquals(28.1, o.get(0, 0), 0.01);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  Matrix i = new Matrix(new float [] {2, 2}, 1);
  Set<Layer> calculated = new HashSet<>();
  calculated.add(mlp.getInputLayer());

  ValuesProvider results = new ValuesProvider();
  results.addValues(input, i);

  Environment.getInstance().setExecutionMode(EXECUTION_MODE.SEQ);

  mlp.getLayerCalculator().calculate(mlp, output, calculated, results);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  c.getWeights()[15] = 4;

  Matrix i1 = new Matrix(new float[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 }, 1);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(nn.getInputLayer(), i1);

  Set<Layer> calculatedLayers = new HashSet<>();
  calculatedLayers.add(nn.getInputLayer());
  nn.getLayerCalculator().calculate(nn, nn.getOutputLayer(), calculatedLayers, vp);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  ConnectionCalculator calc = new AparapiMaxPooling2D();
  Matrix o = new Matrix(8, 2);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(c.getInputLayer(), i1);
  vp.addValues(c.getOutputLayer(), o);

  calc.calculate(connections, vp, c.getOutputLayer());

  assertEquals(3, o.get(0, 0), 0);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  ConnectionCalculator calc = new AparapiMaxPooling2D();
  Matrix o = new Matrix(8, 2);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(c.getInputLayer(), i1);
  vp.addValues(c.getOutputLayer(), o);

  calc.calculate(connections, vp, c.getOutputLayer());

  assertEquals(3, o.get(0, 0), 0);
  assertEquals(4, o.get(1, 0), 0);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  AparapiAveragePooling2D calc = new AparapiAveragePooling2D();
  Matrix o = new Matrix(8, 2);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(c.getInputLayer(), i1);
  vp.addValues(c.getOutputLayer(), o);

  calc.calculate(connections, vp, c.getOutputLayer());

  assertEquals(1.75, o.get(0, 0), 0);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  AparapiAveragePooling2D calc = new AparapiAveragePooling2D();
  Matrix o = new Matrix(8, 2);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(c.getInputLayer(), i1);
  vp.addValues(c.getOutputLayer(), o);

  calc.calculate(connections, vp, c.getOutputLayer());

  assertEquals(1.75, o.get(0, 0), 0);
  assertEquals(2.75, o.get(1, 0), 0);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  connections.add(c);

  Matrix o = new Matrix(1, 2);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(c.getInputLayer(), i1);
  vp.addValues(c.getOutputLayer(), o);

  AparapiStochasticPooling2D calc = new AparapiStochasticPooling2D();
  calc.calculate(connections, vp, c.getOutputLayer());
View Full Code Here

Examples of com.github.neuralnetworks.calculation.ValuesProvider.addValues()

  Matrix o = new Matrix(1, 2);

  ValuesProvider vp = new ValuesProvider();
  vp.addValues(c.getInputLayer(), i1);
  vp.addValues(c.getOutputLayer(), o);

  AparapiStochasticPooling2D calc = new AparapiStochasticPooling2D();
  calc.calculate(connections, vp, c.getOutputLayer());

  assertEquals(2.08, o.get(0, 0), 0.01);
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.