Skip to content

Commit

Permalink
ops ResizeBilinear to also accept output size in int64 (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
DwayneDuane committed Jul 6, 2020
1 parent 3cd3c75 commit 6b46a56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coremltools/converters/mil/frontend/tensorflow/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ def ResizeNearestNeighbor(context, node):
and isinstance(Wout, (_np.int32, _np.int64))
):
raise ValueError(
'"ResizeNearestNeighbor" op: the second input, which is the output size, must have elements of type int32'
'"ResizeNearestNeighbor" op: the second input, which is the output size, must have elements of type int32 or int64'
)

if Hout < Hin and Wout < Win:
Expand Down Expand Up @@ -2055,9 +2055,9 @@ def ResizeBilinear(context, node):

Hout, Wout = context[node.inputs[1]].val

if not (isinstance(Hout, _np.int32) and isinstance(Wout, _np.int32)):
if not (isinstance(Hout, (_np.int32, _np.int64)) and isinstance(Wout, (_np.int32, _np.int64))):
raise ValueError(
'"ResizeBilinear" op: the second input, which is the output size, must have elements of type int32'
'"ResizeBilinear" op: the second input, which is the output size, must have elements of type int32 or int64'
)

align_corners = node.attr.get("align_corners", False)
Expand Down

0 comments on commit 6b46a56

Please sign in to comment.