fix typo in readme.md

1123
ZhangGe6 4 years ago
parent 637aeea7f1
commit 7efab04f3a

@ -18,7 +18,7 @@ Currently, the following editing operations are supported:
- Delete a single node.
- Delete a node and all the nodes rooted on it.
- Recover a deleted node.
- [x] Rename the name of node inputs/outputs
- [x] Rename the node inputs/outputs
- [x] Rename the model inputs/outputs
- [x] Edit the attribute of nodes
- [x] Add new nodes (experimental)
@ -136,8 +136,8 @@ The process is shown in the following figure:
<img src="./docs/rename_io.gif" style="zoom:75%;" />
## Rename the name of node inputs/outputs
Click the model input/output node, type a new name for it in the sidebar, then we are done.
## Rename the model inputs/outputs
Click the model input/output node, type a new name in the sidebar, then we are done.
## Edit the attribute of nodes

@ -1077,11 +1077,13 @@ onnx.Tensor = class {
toString() {
const context = this._context();
// console.log(context)
if (context.state) {
return '';
}
context.limit = 10000;
const value = this._decode(context, 0);
console.log(value)
return onnx.Tensor._stringify(value, '', ' ');
}
@ -1260,6 +1262,7 @@ onnx.Tensor = class {
}
static _stringify(value, indentation, indent) {
// console.log(value, Array.isArray(value)) // ..., false
if (Array.isArray(value)) {
const result = [];
result.push(indentation + '[');

@ -883,6 +883,7 @@ sidebar.ArgumentView = class {
let name = this._argument.name || '';
this._hasId = name ? true : false;
this._hasKind = initializer && initializer.kind ? true : false;
// console.log(this._hasId, this._hasKind, type) // true true ...
if (this._hasId || (!this._hasKind && !type)) {
this._hasId = true;
@ -914,12 +915,14 @@ sidebar.ArgumentView = class {
}
else if (this._hasKind) {
console.log("this._hasKind is called")
const kindLine = this._host.document.createElement('div');
kindLine.className = 'sidebar-view-item-value-line';
kindLine.innerHTML = 'kind: <b>' + initializer.kind + '</b>';
this._element.appendChild(kindLine);
}
else if (type) {
console.log("type is called")
const typeLine = this._host.document.createElement('div');
typeLine.className = 'sidebar-view-item-value-line-border';
typeLine.innerHTML = 'type: <code><b>' + type.toString().split('<').join('&lt;').split('>').join('&gt;') + '</b></code>';
@ -1009,6 +1012,8 @@ sidebar.ArgumentView = class {
valueLine.className = 'sidebar-view-item-value-line-border';
contentLine.innerHTML = state || initializer.toString();
console.log(initializer)
console.log(state, initializer.toString())
}
catch (err) {
contentLine.innerHTML = err.toString();

Loading…
Cancel
Save