This PR adds resize to the change_3d_tensors_to_4d transformation. The implementation supports resize version 10 up to 19.
Version 10 only supports scales as an input, other than the input tensor.
Version 11 up to 19 additionally support the roi and sizes inputs. sizes and scales are mutually exclusive. The Problem is that different versions have a different understanding of how to mark an input as unused. As an example:
Version 11 dictates: "If sizes is needed, the user must set scales to an empty tensor."
Version 13 dictates: "If sizes is needed, the user can use an empty string as the name of scales in this operator’s input list."
I am thus checking if scales or sizes exist by checking if they are None or are empty. None is returned by model.get_initializer() if the input is an empty string in the input list.
This PR adds resize to the change_3d_tensors_to_4d transformation. The implementation supports resize version 10 up to 19.
Version 10 only supports
scales
as an input, other than the input tensor.Version 11 up to 19 additionally support the
roi
andsizes
inputs.sizes
andscales
are mutually exclusive. The Problem is that different versions have a different understanding of how to mark an input as unused. As an example:sizes
is needed, the user must setscales
to an empty tensor."sizes
is needed, the user can use an empty string as the name ofscales
in this operator’s input list."I am thus checking if
scales
orsizes
exist by checking if they are None or are empty. None is returned bymodel.get_initializer()
if the input is an empty string in the input list.