be stored as part of f.
Note:
 torch.jit.save attempts to preserve the behavior of some
 operators across versions. For example, dividing two integer
 tensors in PyTorch 1.5 performed floor division, and if the
 module containing that code is saved in PyTorch 1.5 and loaded in
 PyTorch 1.6 its division behavior will be preserved. The same
 module saved in PyTorch 1.6 will fail to load in PyTorch 1.5,
 however, since the behavior of division changed in 1.6, and 1.5
 does not know how to replicate the 1.6 behavior.

Example:
  import torch
  import io

  class MyModule(torch.nn.Module):
      def forward(self, x):
          return x + 10

  m = torch.jit.script(MyModule())

  # Save to file
  torch.jit.save(m, 'scriptmodule.pt')
  # This line is equivalent to the previous
  m.save("scriptmodule.pt")

  # Save to io.BytesIO buffer
  buffer = io.BytesIO()
  torch.jit.save(m, buffer)
