def _rsqrt(converter, node: Any, inputs: List[str]) -> Any:
    x_in = converter.outputs[inputs[0]]
    if isinstance(x_in, tf.NodeDef):
        tensor = x_in.attr['value'].tensor
        shape = [i.size for i in tensor.tensor_shape.dim]
        dtype = x_in.attr['dtype'].type
        if (dtype == tf.float32):
            nums = array.array('f', tensor.tensor_content)
        elif (dtype == tf.float64):
            nums = array.array('d', tensor.tensor_content)
        else:
            raise TypeError('Unsupported dtype for rsqrt')

        def inputter_fn():
            return tf.constant((1 / np.sqrt(np.array(nums).reshape(shape))))
    else:
        decoded = converter.protocol._decode(x_in.value_on_0, True)

        def inputter_fn():
            return tf.rsqrt(decoded)
    x = converter.protocol.define_public_input(converter.model_provider, inputter_fn)
    return x
def _rsqrt(converter, node: Any, inputs: List[str]) -> Any:
    x_in = converter.outputs[inputs[0]]
    if isinstance(x_in, tf.NodeDef):
        tensor = x_in.attr['value'].tensor
        shape = [i.size for i in tensor.tensor_shape.dim]
        dtype = x_in.attr['dtype'].type
        if (dtype == tf.float32):
            nums = array.array('f', tensor.tensor_content)
        elif (dtype == tf.float64):
            nums = array.array('d', tensor.tensor_content)
        else:
            raise TypeError('Unsupported dtype for rsqrt')

        def inputter_fn():
            return tf.constant((1 / np.sqrt(np.array(nums).reshape(shape))))
    else:
        decoded = converter.protocol._decode(x_in.value_on_0, True)

        def inputter_fn():
            return tf.rsqrt(decoded)
    x = converter.protocol.define_public_input(converter.model_provider, inputter_fn)
    return x