layout = attrs.layout
if layout == "NHWC":
out = [_NHWC_resize_shape_func(inputs[0].shape, inputs[1], convert(len(inputs[0].shape)))]
elif (layout == "NCHW") or nchw_pack_layout(layout) or nchw_xc_layout(layout):
out = [_NCHW_resize_shape_func(inputs[0].shape, inputs[1], convert(len(inputs[0].shape)))]
else:
raise ValueError("Resize Unsupported Layout", layout)
return out
After Change
convert(2), convert(3))]
else:
height_axis = width_axis = 1
for i, letter in enumerate(layout):
if letter == "H":
height_axis = i
if letter == "W":
width_axis = i
out = [_resize_shape_func(inputs[0].shape, inputs[1], convert(len(inputs[0].shape)),
convert(height_axis), convert(width_axis))]