code: def test_conv3d_model(tmpdir):
      pytest.skip(
          "Needs to be fixed after removal of batch axis change."
      )
  
      def create_model(input):
          with C.default_options(activation=C.relu):
              model = C.layers.Sequential(
                  [
                      C.layers.Convolution3D((3, 3, 3), 64, pad=True),
                      C.layers.MaxPooling((1, 2, 2), (1, 2, 2)),
                      C.layers.For(
                          range(3),
                          lambda i: [
                              C.layers.Convolution3D(
                                  (3, 3, 3), [96, 128, 128][i], pad=True
                              ),
                              C.layers.Convolution3D(
                                  (3, 3, 3), [96, 128, 128][i], pad=True
                              ),
                              C.layers.MaxPooling((2, 2, 2), (2, 2, 2)),
                          ],
                      ),
                      C.layers.For(
                          range(2),
                          lambda: [
                              C.layers.Dense(1024),
                              C.layers.Dropout(0.5),
                          ],
                      ),
                      C.layers.Dense(100, activation=None),
                  ]
              )
  
          return model(input)
  
      video_shape = (3, 20, 32, 32)
      video = np.asarray(
          np.random.uniform(-1, 1, video_shape), dtype=np.float32
      )
  
      x = C.input_variable(video.shape)
      root_node = create_model(x)
  
      filename = os.path.join(str(tmpdir), R"conv3d_model.onnx")
      root_node.save(filename, format=C.ModelFormat.ONNX)
  
      loaded_node = C.Function.load(filename, format=C.ModelFormat.ONNX)
      assert root_node.shape == loaded_node.shape
  
      x_ = loaded_node.arguments[0]
      assert np.allclose(
          loaded_node.eval({x_: video}), root_node.eval({x: video})
      )
  
      # Additional test to ensure that loaded_node can be saved as both ONNX and CNTKv2 again.
      filename2 = os.path.join(str(tmpdir), R"conv3d_model2.onnx")
      loaded_node.save(filename2, format=C.ModelFormat.ONNX)
  
      filename3 = os.path.join(str(tmpdir), R"conv3d_model2.cntkmodel")
      loaded_node.save(filename3, format=C.ModelFormat.CNTKv2)
  
file_path: CNTK/bindings/python/cntk/tests/onnx_format_test.py
imports: import os
  import numpy
  import cntk
  from cntk.ops.tests.ops_test_utils import cntk_device
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_conv3d_model(tmpdir) and returns: model