Examples of AparapiConv2DFF


Examples of com.github.neuralnetworks.calculation.neuronfunctions.AparapiConv2DFF

  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);

  Matrix o = new Matrix(4, 1);

  AparapiConv2D conv = new AparapiConv2DFF(c, 1);

  conv.calculate(c, i1, o);

  // most simple case
  assertEquals(164, o.get(0, 0), 0);
  assertEquals(184, o.get(0, 1), 0);
  assertEquals(224, o.get(0, 2), 0);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.neuronfunctions.AparapiConv2DFF

  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);

  Matrix o = new Matrix(8, 1);

  AparapiConv2D conv = new AparapiConv2DFF(c, 1);

  conv.calculate(c, i1, o);

  assertEquals(164, o.get(0, 0), 0);
  assertEquals(184, o.get(0, 1), 0);
  assertEquals(224, o.get(0, 2), 0);
  assertEquals(244, o.get(0, 3), 0);
View Full Code Here

Examples of com.github.neuralnetworks.calculation.neuronfunctions.AparapiConv2DFF

  TensorIterator it = vp.get(c.getInputLayer()).iterator();
  for (int i = 0; i < vp.get(c.getInputLayer()).getSize(); i++) {
      vp.get(c.getInputLayer()).getElements()[it.next()] = i + 1;
  }

  AparapiConv2D conv = new AparapiConv2DFF(c, vp, c.getOutputLayer());
  conv.calculate(c, vp, c.getOutputLayer());

  // most simple case
  Tensor o = vp.get(c.getOutputLayer());

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

Examples of com.github.neuralnetworks.calculation.neuronfunctions.AparapiConv2DFF

  TensorIterator it = vp.get(c.getInputLayer()).iterator();
  for (int i = 0; i < vp.get(c.getInputLayer()).getSize(); i++) {
      vp.get(c.getInputLayer()).getElements()[it.next()] = i + 1;
  }

  AparapiConv2D conv = new AparapiConv2DFF(c, vp, c.getOutputLayer());
  conv.calculate(c, vp, c.getOutputLayer());

  Tensor o = vp.get(c.getOutputLayer());

  assertEquals(164, o.get(0, 0, 0, 0), 0);
  assertEquals(184, o.get(0, 0, 1, 0), 0);
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.