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

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

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

Nd4j.saveBinary介绍

[英]Save an ndarray to the given file
[中]将数据数组保存到给定文件

代码示例

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

  1. /**
  2. * Save the current mean and std
  3. * @param mean the mean
  4. * @param std the std
  5. * @throws IOException
  6. */
  7. public void save(File mean, File std) throws IOException {
  8. Nd4j.saveBinary(this.mean, mean);
  9. Nd4j.saveBinary(this.std, std);
  10. }

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

  1. /**
  2. * Save distribution statistics to the file system
  3. *
  4. * @param meanFile file to contain the means
  5. * @param stdFile file to contain the standard deviations
  6. */
  7. public void save(@NonNull File meanFile, @NonNull File stdFile) throws IOException {
  8. Nd4j.saveBinary(getMean(), meanFile);
  9. Nd4j.saveBinary(getStd(), stdFile);
  10. }

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

  1. /**
  2. * Save the current min and max
  3. *
  4. * @param files the statistics to save
  5. * @throws IOException
  6. * @deprecated use {@link NormalizerSerializer instead}
  7. */
  8. public void save(File... files) throws IOException {
  9. Nd4j.saveBinary(getMin(), files[0]);
  10. Nd4j.saveBinary(getMax(), files[1]);
  11. if (isFitLabel()) {
  12. Nd4j.saveBinary(getLabelMin(), files[2]);
  13. Nd4j.saveBinary(getLabelMax(), files[3]);
  14. }
  15. }

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

  1. try {
  2. Nd4j.saveBinary(params, f);
  3. log.info("Saved parameters to file: {}", f.getAbsolutePath());
  4. } catch (IOException e) {

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

  1. wrapper.fit(trainData);
  2. Nd4j.saveBinary(net.params(),new File("videomodel.bin"));
  3. FileUtils.writeStringToFile(new File("videoconf.json"), conf.toJson());
  4. System.out.println("Epoch " + i + " complete");

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

  1. /**
  2. * Save the current mean and std
  3. * @param mean the mean
  4. * @param std the std
  5. * @throws IOException
  6. */
  7. public void save(File mean, File std) throws IOException {
  8. Nd4j.saveBinary(this.mean, mean);
  9. Nd4j.saveBinary(this.std, std);
  10. }

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

  1. /**
  2. * Save distribution statistics to the file system
  3. *
  4. * @param meanFile file to contain the means
  5. * @param stdFile file to contain the standard deviations
  6. */
  7. public void save(@NonNull File meanFile, @NonNull File stdFile) throws IOException {
  8. Nd4j.saveBinary(getMean(), meanFile);
  9. Nd4j.saveBinary(getStd(), stdFile);
  10. }

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

  1. /**
  2. * Save the current min and max
  3. *
  4. * @param files the statistics to save
  5. * @throws IOException
  6. * @deprecated use {@link NormalizerSerializer instead}
  7. */
  8. public void save(File... files) throws IOException {
  9. Nd4j.saveBinary(getMin(), files[0]);
  10. Nd4j.saveBinary(getMax(), files[1]);
  11. if (isFitLabel()) {
  12. Nd4j.saveBinary(getLabelMin(), files[2]);
  13. Nd4j.saveBinary(getLabelMax(), files[3]);
  14. }
  15. }

相关文章