Package com.github.neuralnetworks.tensor

Examples of com.github.neuralnetworks.tensor.Tensor.forEach()


    protected void calculateBias(Connections bias, ValuesProvider valuesProvider) {
  if (bias != null) {
      Tensor biasValue = TensorFactory.tensor(bias.getInputLayer(), bias, valuesProvider);
      if (biasValue.get(new int[biasValue.getDimensions().length]) == 0) {
    biasValue.forEach(i -> biasValue.getElements()[i] = 1);
      }

      Matrix weights = ((FullyConnected) bias).getWeights();
      Matrix output = TensorFactory.tensor(bias.getOutputLayer(), bias, valuesProvider);
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.