Browse Source

!432 UI tensor bugfix

Merge pull request !432 from 夏易凡/0710master
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
74e4593cdd
4 changed files with 17 additions and 11 deletions
  1. +11
    -5
      mindinsight/ui/src/components/gridTableSimple.vue
  2. +1
    -1
      mindinsight/ui/src/components/histogramUnit.vue
  3. +1
    -1
      mindinsight/ui/src/views/train-manage/histogram.vue
  4. +4
    -4
      mindinsight/ui/src/views/train-manage/tensor.vue

+ 11
- 5
mindinsight/ui/src/components/gridTableSimple.vue View File

@@ -114,6 +114,7 @@ export default {
updated: false, // Updated
scrollTop: false, // Wheather scroll to the top
filterCorrect: true, // Wheather the dimension input is correct
viewResizeFlag: false, // Size reset flag
// Accuray options
accuracyArr: [
{label: 0, value: 0},
@@ -274,9 +275,10 @@ export default {
this.gridObj.setData(this.formateArr, this.scrollTop);
this.scrollTop = false;
const columnsLength = this.columnsData.length;
if (this.columnsLength !== columnsLength) {
if (this.columnsLength !== columnsLength || this.viewResizeFlag) {
this.gridObj.setColumns(this.columnsData);
this.columnsLength = columnsLength;
this.viewResizeFlag = false;
}
this.gridObj.render();
});
@@ -367,10 +369,14 @@ export default {
*/
resizeView() {
if (this.gridObj) {
this.$nextTick(() => {
this.gridObj.resizeCanvas();
this.gridObj.render();
});
if (this.incorrectData) {
this.viewResizeFlag = true;
} else {
this.$nextTick(() => {
this.gridObj.resizeCanvas();
this.gridObj.render();
});
}
}
},
/**


+ 1
- 1
mindinsight/ui/src/components/histogramUnit.vue View File

@@ -696,7 +696,7 @@ export default {
});
if (yIndex === null && this.viewName === 1) {
this.fullData.forEach((item, index) => {
if (index > value[1]) {
if (index >= value[1]) {
yIndex = yIndex === null ? index : Math.min(yIndex, index);
}
});


+ 1
- 1
mindinsight/ui/src/views/train-manage/histogram.vue View File

@@ -952,7 +952,7 @@ export default {
});
if (yIndex === null && this.curViewName === 1) {
sampleObject.chartData.forEach((item, index) => {
if (index > value[1]) {
if (index >= value[1]) {
yIndex = yIndex === null ? index : Math.min(yIndex, index);
}
});


+ 4
- 4
mindinsight/ui/src/views/train-manage/tensor.vue View File

@@ -566,7 +566,7 @@ export default {
sampleItem.curStep = '';
sampleItem.sliderValue = 0;
sampleItem.totalStepNum = 0;
this.clearMartixData();
this.clearMartixData(sampleItem);
return;
}
const oldTotalStepNum = sampleItem.totalStepNum;
@@ -966,9 +966,6 @@ export default {
clearTimeout(sampleItem.sliderChangeTimer);
sampleItem.sliderChangeTimer = null;
}
if (sampleItem.curMartixShowSliderValue === sliderValue) {
return;
}
if (!sampleItem.fullData || !sampleItem.fullData[sliderValue]) {
return;
}
@@ -980,6 +977,9 @@ export default {
);
sampleItem.curDataType = sampleItem.formateData.value.data_type;
sampleItem.curDims = JSON.stringify(sampleItem.formateData.value.dims);
if (sampleItem.curMartixShowSliderValue === sliderValue) {
return;
}
sampleItem.sliderChangeTimer = setTimeout(() => {
this.freshtMartixData(sampleItem);
}, 500);


Loading…
Cancel
Save