code: def test_large_model_serialization_double(tmpdir):
      import os
  
      two_gb = 2**31
      type_size = np.dtype(np.float64).itemsize
      size = two_gb / type_size + 10
  
      assert size * type_size > two_gb
  
      device = C.device.cpu()
      i = C.sequence.input(size, dtype=np.float64)
      w = C.Parameter(
          (size,),
          dtype=np.float64,
          init=C.uniform(3.0, seed=12345),
          device=device,
      )
      z = C.times(i, w)
  
      filename = str(
          tmpdir / "test_large_model_serialization_double.out"
      )
      z.save(filename)
  
      assert os.path.getsize(filename) > two_gb
  
      y = C.Function.load(filename, device=device)
  
      assert len(z.parameters) == len(y.parameters)
  
      for param_pair in zip(z.parameters, y.parameters):
          assert param_pair[0].shape == param_pair[1].shape
          assert np.allclose(param_pair[0].value, param_pair[1].value)
  
file_path: CNTK/bindings/python/cntk/tests/persist_test.py
imports: import numpy
  import cntk
  from cntk.debugging import save_as_legacy_model
label_desc: Use image node_id 6 for calling a global function with example usage: test_large_model_serialization_double(tmpdir) without return types