org.nd4j.linalg.factory.Nd4j.accumulate()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.nd4j.linalg.factory.Nd4j.accumulate()方法的一些代码示例,展示了Nd4j.accumulate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nd4j.accumulate()方法的具体详情如下:
包路径:org.nd4j.linalg.factory.Nd4j
类名称:Nd4j
方法名:accumulate

Nd4j.accumulate介绍

[英]This method sums given arrays and stores them to a new target array
[中]此方法对给定数组求和,并将其存储到新的目标数组

代码示例

代码示例来源:origin: deeplearning4j/nd4j

  1. /**
  2. * This method sums given arrays and stores them to a given target array
  3. *
  4. * @param target
  5. * @param arrays
  6. * @return
  7. */
  8. public static INDArray accumulate(INDArray target, Collection<INDArray> arrays) {
  9. return accumulate(target, arrays.toArray(new INDArray[0]));
  10. }

代码示例来源:origin: deeplearning4j/nd4j

  1. /**
  2. * This method sums given arrays and stores them to a new target array
  3. *
  4. * @param arrays
  5. * @return
  6. */
  7. public static INDArray accumulate(Collection<INDArray> arrays) {
  8. if (arrays == null|| arrays.size() == 0)
  9. throw new ND4JIllegalStateException("Input for accumulation is null or empty");
  10. return accumulate(arrays.toArray(new INDArray[0]));
  11. }

代码示例来源:origin: deeplearning4j/nd4j

  1. /**
  2. * This method sums given arrays and stores them to a new array
  3. *
  4. * @param arrays
  5. * @return
  6. */
  7. public static INDArray accumulate(INDArray... arrays) {
  8. if (arrays == null|| arrays.length == 0)
  9. throw new ND4JIllegalStateException("Input for accumulation is null or empty");
  10. return accumulate(Nd4j.create(arrays[0].shape(), arrays[0].ordering()), arrays);
  11. }

代码示例来源:origin: org.nd4j/nd4j-api

  1. /**
  2. * This method sums given arrays and stores them to a given target array
  3. *
  4. * @param target
  5. * @param arrays
  6. * @return
  7. */
  8. public static INDArray accumulate(INDArray target, Collection<INDArray> arrays) {
  9. return accumulate(target, arrays.toArray(new INDArray[0]));
  10. }

代码示例来源:origin: org.nd4j/nd4j-api

  1. /**
  2. * This method sums given arrays and stores them to a new target array
  3. *
  4. * @param arrays
  5. * @return
  6. */
  7. public static INDArray accumulate(Collection<INDArray> arrays) {
  8. if (arrays == null|| arrays.size() == 0)
  9. throw new ND4JIllegalStateException("Input for accumulation is null or empty");
  10. return accumulate(arrays.toArray(new INDArray[0]));
  11. }

代码示例来源:origin: org.nd4j/nd4j-api

  1. /**
  2. * This method sums given arrays and stores them to a new array
  3. *
  4. * @param arrays
  5. * @return
  6. */
  7. public static INDArray accumulate(INDArray... arrays) {
  8. if (arrays == null|| arrays.length == 0)
  9. throw new ND4JIllegalStateException("Input for accumulation is null or empty");
  10. return accumulate(Nd4j.create(arrays[0].shape(), arrays[0].ordering()), arrays);
  11. }

代码示例来源:origin: org.deeplearning4j/deeplearning4j-nn

  1. Nd4j.accumulate(storage, candidates);

相关文章