|
@@ -90,7 +90,7 @@ public class I2IDSSMPredict {
|
|
|
|
|
|
// 分割left_features_str并转换为float数组
|
|
|
String[] leftFeaturesArray = leftFeaturesStr.split(",");
|
|
|
- double[] leftFeatures = new double[leftFeaturesArray.length];
|
|
|
+ float[] leftFeatures = new float[leftFeaturesArray.length];
|
|
|
for (int i = 0; i < leftFeaturesArray.length; i++) {
|
|
|
leftFeatures[i] = Float.parseFloat(leftFeaturesArray[i]);
|
|
|
}
|
|
@@ -106,7 +106,7 @@ public class I2IDSSMPredict {
|
|
|
// 4 获取输入Tensor
|
|
|
String outNames = predictor.getOutputNameById(0);
|
|
|
Tensor outHandle = predictor.getOutputHandle(outNames);
|
|
|
- double[] outData = new double[outHandle.getSize()];
|
|
|
+ float[] outData = new float[outHandle.getSize()];
|
|
|
outHandle.copyToCpu(outData);
|
|
|
|
|
|
|