code: def test_large_model_serialization_float(tmpdir):
      import os
      from cntk.layers import Recurrence, LSTM, Dense
  
      type_size = np.dtype(np.float32).itemsize
      two_gb = 2**31
      size = (2097152 + 4, 256, 512, 4096)
      assert size[0] * size[1] * type_size > two_gb
  
      device = C.device.cpu()
      i = C.sequence.input(size[0])
      w = C.Parameter(
          (size[0], size[1]),
          init=C.uniform(3.0, seed=12345),
          device=device,
      )
      e = C.times(i, w)
  
      h_fwd = Recurrence(LSTM(size[2]))(e)
      h_bwd = Recurrence(LSTM(size[2]), go_backwards=True)(e)
      h_last_fwd = C.sequence.last(h_fwd)
      h_first_bwd = C.sequence.first(h_bwd)
      t = C.splice(h_last_fwd, h_first_bwd)
  
      z1 = Dense(size[2], activation=C.relu)(t)
      z = Dense(2, activation=None)(z1)
  
      filename = str(
          tmpdir / "test_large_model_serialization_float.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 5 for calling a global function with example usage: test_large_model_serialization_float(tmpdir) without return types