def func(x):

      def transform_row(row):
        return math_ops.sqrt(
            math_ops.reduce_mean(math_ops.square(row * x), keepdims=True))