优化读取分块矩阵的性能

pull/13/head
Administrator 5 years ago
parent 6f539050d6
commit c82fff32cc

@ -363,8 +363,8 @@ public class Operation {//进行计算
List<Integer> list = new ArrayList<>(); List<Integer> list = new ArrayList<>();
Frame frame = templeConfig.getFrame(); Frame frame = templeConfig.getFrame();
List<FrameBody> frameBodies = convolution.getRegion(matrix, frame); List<FrameBody> frameBodies = convolution.getRegion(matrix, frame);
for (FrameBody frameBody : frameBodies) {
MatrixBack matrixBack = new MatrixBack(); MatrixBack matrixBack = new MatrixBack();
for (FrameBody frameBody : frameBodies) {
intoConvolutionNetwork(eventId, frameBody.getMatrix(), templeConfig.getConvolutionNerveManager().getSensoryNerves(), intoConvolutionNetwork(eventId, frameBody.getMatrix(), templeConfig.getConvolutionNerveManager().getSensoryNerves(),
false, -1, matrixBack); false, -1, matrixBack);
Matrix myMatrix = matrixBack.getMatrix(); Matrix myMatrix = matrixBack.getMatrix();
@ -415,6 +415,7 @@ public class Operation {//进行计算
} }
return toPosition(frameBodies, frame.getWidth(), frame.getHeight()); return toPosition(frameBodies, frame.getWidth(), frame.getHeight());
} else if (templeConfig.getStudyPattern() == StudyPattern.Accuracy_Pattern) { } else if (templeConfig.getStudyPattern() == StudyPattern.Accuracy_Pattern) {
MatrixBack matrixBack = new MatrixBack();
for (FrameBody frameBody : frameBodies) { for (FrameBody frameBody : frameBodies) {
intoConvolutionNetwork(eventId, frameBody.getMatrix(), templeConfig.getConvolutionNerveManager().getSensoryNerves(), intoConvolutionNetwork(eventId, frameBody.getMatrix(), templeConfig.getConvolutionNerveManager().getSensoryNerves(),
false, -1, matrixBack); false, -1, matrixBack);

Loading…
Cancel
Save