|
9 | 9 | from __future__ import print_function
|
10 | 10 | from __future__ import unicode_literals
|
11 | 11 |
|
| 12 | +import sys |
12 | 13 | import logging
|
13 | 14 |
|
14 | 15 | import numpy as np
|
@@ -356,7 +357,7 @@ def make_gathernd(ctx, params, indices, output, scope_name, t_params, shapes, dt
|
356 | 357 | # reshape indices into [sum(indices[:-1]), indices[-1]]
|
357 | 358 | indices_shape = ctx.make_node("Shape", [indices], dtypes=[TensorProto.INT64])
|
358 | 359 | indices_size = ctx.make_node("Size", [indices])
|
359 |
| - attr = {"axes": [0], "ends": [utils.get_max_value(np.int64)], "starts": [-1]} |
| 360 | + attr = {"axes": [0], "ends": [sys.maxsize], "starts": [-1]} |
360 | 361 | inputs_map = {"data": indices_shape.output[0], **attr}
|
361 | 362 | inner_shape = GraphBuilder(ctx).make_slice(inputs_map, dtypes=[TensorProto.INT64])
|
362 | 363 | outter_shape = ctx.make_node("Div",
|
@@ -414,7 +415,7 @@ def make_gathernd(ctx, params, indices, output, scope_name, t_params, shapes, dt
|
414 | 415 | [inner_loop_shape.output[0], one_const.output[0]],
|
415 | 416 | attr={"axis": 0},
|
416 | 417 | dtypes=[TensorProto.INT64])
|
417 |
| - attr = {"axes": [0], "ends": [utils.get_max_value(np.int64)], "starts": [1]} |
| 418 | + attr = {"axes": [0], "ends": [sys.maxsize], "starts": [1]} |
418 | 419 | inputs_map = {"data": inner_loop_shape_.output[0], **attr}
|
419 | 420 | output_inner_shape = GraphBuilder(ctx).make_slice(inputs_map, dtypes=[TensorProto.INT64])
|
420 | 421 | attr = {"axes": [0], "ends": [-1], "starts": [0]}
|
|
0 commit comments