Преглед изворни кода

1- 修改模型工厂方法,添加读取字符id函数。

bijl пре 5 година
родитељ
комит
46451c83eb

+ 2 - 0
algorithm/src/main/java/org/algorithm/core/neural/TensorFlowModelLoadFactory.java

@@ -51,6 +51,8 @@ public class TensorFlowModelLoadFactory {
 
         dataSet.setDoFilterDiagnosis(true);
         dataSet.readFilterDiagnosisDict();
+        dataSet.setWithSequenceInputs(true);  // 使用序列输入
+        dataSet.readChar2IdDict(modelVersion);  // 读取字符字典
 
         String modelPath = prop.getProperty("basicPath");  // 模型基本路径
         modelVersion = prop.getProperty(modelVersion);

+ 1 - 3
algorithm/src/main/java/org/algorithm/core/neural/dataset/NNDataSet.java

@@ -51,9 +51,7 @@ public abstract class NNDataSet {
         this.makeDictArr();
         this.readReSplitWordDict();
 
-        // 读取序列数据
-        if (this.withSequenceInputs)
-            this.readChar2IdDict(modelAndVersion);
+
     }
 
     /**