Skip to content

Commit

Permalink
Update onnx-metadata.json
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jul 22, 2023
1 parent 2a1ab4d commit 0b018b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion source/onnx-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -34557,7 +34557,7 @@
"module": "ai.onnx",
"version": 13,
"support_level": "common",
"description": "Produces a slice of the input tensor along multiple axes. Similar to numpy:\nhttps://numpy.org/doc/stable/user/basics.indexing.html?highlight=slice#slicing-and-striding\n\nSlice uses the `starts`, `ends`, `axes` and `steps` inputs to select a sub-tensor\nof its input `data` tensor.\n\nAn effective `start[i]`, `end[i]`, and `step[i]` must be computed for each `i`\nin `[0, ... r-1]` where `r = rank(input)` as follows:\n\nIf `axes` are omitted, they are set to `[0, ..., r-1]`.\nIf `steps` are omitted, they are set to `[1, ..., 1]` of length `len(starts)`\n\nThe effective values are initialized as `start[i] = 0`, `end[i] = dims[i]` where\n`dims` are the dimensions of `input` and `step[i] = `1.\n\nAll negative elements of `axes` are made non-negatve by adding `r` to them, where\n`r =rank(input)`.\n\nAll negative values in `starts[i]` and `ends[i]` have `dims[axes[i]]` added to them,\nwhere `dims` are the dimensions of `input`. Then `start[axes[i]]` is the adjusted\n`starts[i]` is clamped into the range `[0, dims[axes[i]]]` for positive stepping\nand `[0, dims[axes[i]]-1]` for negative stepping.\n\nThe clamping for the adjusted `ends[i]` depends on the sign of `steps[i]` and must\naccommodate copying 0 through `dims[axes[i]]` elements, so for positive stepping\n`end[axes[i]]` is clamped to `[0, dims[axes[i]]]`, while for negative stepping it\nis clamped to `[-1, dims[axes[i]]-1]`.\n\nFinally, `step[axes[i]] = steps[i]`.\n\nFor slicing to the end of a dimension with unknown size, it is recommended to pass\nin `INT_MAX` when slicing forward and 'INT_MIN' when slicing backward.\n\nExample 1:\n\n```\ndata = [\n [1, 2, 3, 4],\n [5, 6, 7, 8],\n]\naxes = [0, 1]\nstarts = [1, 0]\nends = [2, 3]\nsteps = [1, 2]\nresult = [\n [5, 7],\n]\n```\n\nExample 2:\n\n```\ndata = [\n [1, 2, 3, 4],\n [5, 6, 7, 8],\n]\nstarts = [0, 1]\nends = [-1, 1000]\nresult = [\n [2, 3, 4],\n]\n```\n",
"description": "Produces a slice of the input tensor along multiple axes. Similar to numpy:\nhttps://numpy.org/doc/stable/user/basics.indexing.html?highlight=slice#slicing-and-striding\n\nSlice uses the `starts`, `ends`, `axes` and `steps` inputs to select a sub-tensor\nof its input `data` tensor.\n\nAn effective `starts[i]`, `ends[i]`, and `steps[i]` must be computed for each `i`\nin `[0, ... r-1]` where `r = rank(input)` as follows:\n\nIf `axes` are omitted, they are set to `[0, ..., r-1]`.\nIf `steps` are omitted, they are set to `[1, ..., 1]` of length `len(starts)`\n\nThe effective values are initialized as `start[i] = 0`, `ends[i] = dims[i]` where\n`dims` are the dimensions of `input` and `steps[i] = `1.\n\nAll negative elements of `axes` are made non-negatve by adding `r` to them, where\n`r =rank(input)`.\n\nAll negative values in `starts[i]` and `ends[i]` have `dims[axes[i]]` added to them,\nwhere `dims` are the dimensions of `input`. Then `start[axes[i]]` is the adjusted\n`starts[i]` is clamped into the range `[0, dims[axes[i]]]` for positive stepping\nand `[0, dims[axes[i]]-1]` for negative stepping.\n\nThe clamping for the adjusted `ends[i]` depends on the sign of `steps[i]` and must\naccommodate copying 0 through `dims[axes[i]]` elements, so for positive stepping\n`ends[axes[i]]` is clamped to `[0, dims[axes[i]]]`, while for negative stepping it\nis clamped to `[-1, dims[axes[i]]-1]`.\n\nFinally, `steps[axes[i]] = steps[i]`.\n\nFor slicing to the end of a dimension with unknown size, it is recommended to pass\nin `INT_MAX` when slicing forward and 'INT_MIN' when slicing backward.\n\nExample 1:\n\n```\ndata = [\n [1, 2, 3, 4],\n [5, 6, 7, 8],\n]\naxes = [0, 1]\nstarts = [1, 0]\nends = [2, 3]\nsteps = [1, 2]\nresult = [\n [5, 7],\n]\n```\n\nExample 2:\n\n```\ndata = [\n [1, 2, 3, 4],\n [5, 6, 7, 8],\n]\nstarts = [0, 1]\nends = [-1, 1000]\nresult = [\n [2, 3, 4],\n]\n```\n",
"inputs": [
{
"name": "data",
Expand Down
28 changes: 0 additions & 28 deletions source/tf-proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -2549,10 +2549,7 @@ $root.tensorflow.GraphDebugInfo = class GraphDebugInfo {

constructor() {
this.files = [];
this.frames_by_id = {};
this.traces_by_id = {};
this.traces = {};
this.name_to_trace_id = {};
}

static decode(reader, length) {
Expand All @@ -2564,18 +2561,9 @@ $root.tensorflow.GraphDebugInfo = class GraphDebugInfo {
case 1:
message.files.push(reader.string());
break;
case 4:
reader.entry(message.frames_by_id, () => reader.fixed64(), () => $root.tensorflow.GraphDebugInfo.FileLineCol.decode(reader, reader.uint32()));
break;
case 6:
reader.entry(message.traces_by_id, () => reader.fixed64(), () => $root.tensorflow.GraphDebugInfo.StackTrace.decode(reader, reader.uint32()));
break;
case 2:
reader.entry(message.traces, () => reader.string(), () => $root.tensorflow.GraphDebugInfo.StackTrace.decode(reader, reader.uint32()));
break;
case 5:
reader.entry(message.name_to_trace_id, () => reader.string(), () => reader.fixed64());
break;
default:
reader.skipType(tag & 7);
break;
Expand All @@ -2593,18 +2581,9 @@ $root.tensorflow.GraphDebugInfo = class GraphDebugInfo {
case "files":
reader.array(message.files, () => reader.string());
break;
case "frames_by_id":
reader.entry(message.frames_by_id, () => reader.fixed64(), () => $root.tensorflow.GraphDebugInfo.FileLineCol.decodeText(reader));
break;
case "traces_by_id":
reader.entry(message.traces_by_id, () => reader.fixed64(), () => $root.tensorflow.GraphDebugInfo.StackTrace.decodeText(reader));
break;
case "traces":
reader.entry(message.traces, () => reader.string(), () => $root.tensorflow.GraphDebugInfo.StackTrace.decodeText(reader));
break;
case "name_to_trace_id":
reader.entry(message.name_to_trace_id, () => reader.string(), () => reader.fixed64());
break;
default:
reader.field(tag, message);
break;
Expand Down Expand Up @@ -2688,7 +2667,6 @@ $root.tensorflow.GraphDebugInfo.StackTrace = class StackTrace {

constructor() {
this.file_line_cols = [];
this.frame_id = [];
}

static decode(reader, length) {
Expand All @@ -2700,9 +2678,6 @@ $root.tensorflow.GraphDebugInfo.StackTrace = class StackTrace {
case 1:
message.file_line_cols.push($root.tensorflow.GraphDebugInfo.FileLineCol.decode(reader, reader.uint32()));
break;
case 2:
message.frame_id = reader.array(message.frame_id, () => reader.fixed64(), tag);
break;
default:
reader.skipType(tag & 7);
break;
Expand All @@ -2720,9 +2695,6 @@ $root.tensorflow.GraphDebugInfo.StackTrace = class StackTrace {
case "file_line_cols":
message.file_line_cols.push($root.tensorflow.GraphDebugInfo.FileLineCol.decodeText(reader));
break;
case "frame_id":
reader.array(message.frame_id, () => reader.fixed64());
break;
default:
reader.field(tag, message);
break;
Expand Down

0 comments on commit 0b018b3

Please sign in to comment.