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

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

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

Nd4j.readBinary介绍

[英]Read a binary ndarray from the given file
[中]从给定文件中读取二进制数据数组

代码示例

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

  1. /**
  2. * Load the given mean and std
  3. * @param mean the mean file
  4. * @param std the std file
  5. * @throws IOException
  6. */
  7. public void load(File mean, File std) throws IOException {
  8. this.mean = Nd4j.readBinary(mean);
  9. this.std = Nd4j.readBinary(std);
  10. }

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

  1. /**
  2. * Load distribution statistics from the file system
  3. *
  4. * @param meanFile file containing the means
  5. * @param stdFile file containing the standard deviations
  6. */
  7. public static DistributionStats load(@NonNull File meanFile, @NonNull File stdFile) throws IOException {
  8. return new DistributionStats(Nd4j.readBinary(meanFile), Nd4j.readBinary(stdFile));
  9. }

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

  1. /**
  2. * Load the given min and max
  3. *
  4. * @param statistics the statistics to load
  5. * @throws IOException
  6. */
  7. public void load(File... statistics) throws IOException {
  8. setFeatureStats(new MinMaxStats(Nd4j.readBinary(statistics[0]), Nd4j.readBinary(statistics[1])));
  9. if (isFitLabel()) {
  10. setLabelStats(new MinMaxStats(Nd4j.readBinary(statistics[2]), Nd4j.readBinary(statistics[3])));
  11. }
  12. }

代码示例来源:origin: deeplearning4j/dl4j-examples

  1. params = Nd4j.readBinary(content[i]);
  2. } catch (Throwable t){
  3. log.error("Error loading file: {}", content[i].getAbsolutePath(), t);

代码示例来源:origin: deeplearning4j/dl4j-examples

  1. SparkComputationGraph scgForEval = new SparkComputationGraph(sc, cgForEval, null);
  2. for (ToEval te : toEval) {
  3. INDArray params = Nd4j.readBinary(te.getFile());
  4. cgForEval.params().assign(params);

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

  1. /**
  2. * Load the given mean and std
  3. * @param mean the mean file
  4. * @param std the std file
  5. * @throws IOException
  6. */
  7. public void load(File mean, File std) throws IOException {
  8. this.mean = Nd4j.readBinary(mean);
  9. this.std = Nd4j.readBinary(std);
  10. }

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

  1. /**
  2. * Load distribution statistics from the file system
  3. *
  4. * @param meanFile file containing the means
  5. * @param stdFile file containing the standard deviations
  6. */
  7. public static DistributionStats load(@NonNull File meanFile, @NonNull File stdFile) throws IOException {
  8. return new DistributionStats(Nd4j.readBinary(meanFile), Nd4j.readBinary(stdFile));
  9. }

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

  1. /**
  2. * Load the given min and max
  3. *
  4. * @param statistics the statistics to load
  5. * @throws IOException
  6. */
  7. public void load(File... statistics) throws IOException {
  8. setFeatureStats(new MinMaxStats(Nd4j.readBinary(statistics[0]), Nd4j.readBinary(statistics[1])));
  9. if (isFitLabel()) {
  10. setLabelStats(new MinMaxStats(Nd4j.readBinary(statistics[2]), Nd4j.readBinary(statistics[3])));
  11. }
  12. }

相关文章