code: def test_conv_free_static_axes(
      warmup_input_size,
      free_dimension_increment,
      filter_size,
      num_output_channels,
      device_id,
      precision,
  ):
      dt = PRECISION_TO_TYPE[precision]
      dev = cntk_device(device_id)
  
      conv_size = tuple(
          [num_output_channels, warmup_input_size[0]] + filter_size
      )
      total_size = np.prod(conv_size)
      y = np.arange(total_size, dtype=dt)
      conv_map = constant(value=y.reshape(conv_size), device=dev)
  
      reference_input_size = tuple(
          warmup_input_size[: -len(free_dimension_increment)]
          + [
              x + y
              for x, y in zip(
                  warmup_input_size[-len(free_dimension_increment) :],
                  free_dimension_increment,
              )
          ]
      )
  
      a_ref = C.input_variable(
          shape=reference_input_size,
          dtype=dt,
          needs_gradient=False,
          name="a_ref",
      )
      a_test = C.input_variable(
          shape=tuple(
              warmup_input_size[: -len(free_dimension_increment)]
              + [C.FreeDimension] * len(free_dimension_increment)
          ),
          dtype=dt,
          needs_gradient=False,
          name="a_test",
      )
  
      from cntk import convolution
  
      conv_op_without_free_dim = convolution(
          conv_map,
          a_ref,
          auto_padding=[False] + [True] * len(filter_size),
      )
      conv_op_with_free_dim = convolution(
          conv_map,
          a_test,
          auto_padding=[False] + [True] * len(filter_size),
      )
  
      input_img_ref = np.ones(reference_input_size, dtype=dt)
      output_ref = conv_op_without_free_dim.eval(
          {a_ref: input_img_ref}, device=dev
      )
  
      input_img_warmup = np.ones(warmup_input_size, dtype=dt)
      _ = conv_op_with_free_dim.eval(
          {a_test: input_img_warmup}, device=dev
      )
  
      output_test = conv_op_with_free_dim.eval(
          {a_test: input_img_ref}, device=dev
      )
  
      assert np.allclose(output_test, output_ref, atol=1e-4)
  
imports: from __future__ import division
  import numpy
  import pytest
  import cntk
  from .ops_test_utils import unittest_helper, _test_unary_op, AA, precision, PRECISION_TO_TYPE, constant, cntk_device
  from cntk.ops import AVG_POOLING, MAX_POOLING, MAX_UNPOOLING
  from cntk.internal import sanitize_dtype_cntk
  from cntk.cntk_py import should_force_deterministic_algorithms
label_desc: Use image node_id 19 for calling a global function with example usage: test_conv_free_static_axes(warmup_input_size, free_dimension_increment, filter_size, num_output_channels, device_id, precision) without return types