@@ -196,6 +196,12 @@ def apply(self, model):
196
196
scales = np .append (scales , np .asarray (1.0 , dtype = np .float32 ))
197
197
model .set_initializer (n .input [1 ], scales )
198
198
elif node_op_type == "Resize" :
199
+ assert ("axes" not in [x .name for x in n .attribute ]), (
200
+ "%s: Axes attribute is not supported." % n .name
201
+ )
202
+ assert (not (len (n .input ) in (3 , 4 ) and model .get_initializer (n .input [1 ]) is not None )), (
203
+ "%s: ROI input is not supported." % n .name
204
+ )
199
205
if len (n .input ) == 2 :
200
206
# Resize version 10
201
207
scales = model .get_initializer (n .input [1 ])
@@ -223,13 +229,6 @@ def apply(self, model):
223
229
sizes = model .get_initializer (n .input [3 ])
224
230
sizes = np .append (sizes , np .asarray (1.0 , dtype = np .int64 ))
225
231
model .set_initializer (n .input [3 ], sizes )
226
- if len (n .input ) in (3 , 4 ) and model .get_initializer (n .input [1 ]) is not None :
227
- # ROI handling
228
- roi = model .get_initializer (n .input [1 ])
229
- d_type = roi .dtype #float64, float32 or float16
230
- # ROI for 3d tensor: [start1, start2, start3, end1, end2, end3]
231
- roi = np .concatenate ((roi [0 :3 ], np .asarray (1.0 , dtype = d_type ), roi [3 :6 ], np .asarray (1.0 , dtype = d_type )), axis = None )
232
- model .set_initializer (n .input [1 ], roi )
233
232
input_shape .append (1 )
234
233
235
234
# Change format of each input/value_info/output tensor
0 commit comments