Skip to content

Instantly share code, notes, and snippets.

@dhruvbird
Created November 16, 2021 22:33
Show Gist options
  • Save dhruvbird/2ec08c5b275138a1e75a3db44c004189 to your computer and use it in GitHub Desktop.
Save dhruvbird/2ec08c5b275138a1e75a3db44c004189 to your computer and use it in GitHub Desktop.
Add additional metadata to PyTorch Lite Model
zf2 = zipfile.ZipFile("AddTensorsModel.ptl", "a")
contents = "Both tensors can be any dtype as long as they can be added"
zf2.writestr("{}/extra/dtype_info.txt".format(archive_name), contents)
zf2.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment