flpelerin commited on
Commit
4a94319
·
1 Parent(s): 251b4a6

Update file export.py

Browse files
Files changed (1) hide show
  1. export.py +10 -0
export.py CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  def SerializeFP32(file, tensor):
2
  d = tensor.detach().cpu().view(-1).to(torch.float32).numpy()
3
  b = struct.pack(f'{len(d)}f', *d)
 
1
+ import os
2
+ import struct
3
+ import argparse
4
+ import json
5
+
6
+ import numpy as np
7
+ import torch
8
+
9
+
10
+
11
  def SerializeFP32(file, tensor):
12
  d = tensor.detach().cpu().view(-1).to(torch.float32).numpy()
13
  b = struct.pack(f'{len(d)}f', *d)