rrg92 commited on
Commit
23b77c7
·
1 Parent(s): 223299e
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -18,6 +18,9 @@ RandomTensor.to(device)
18
  def sysinfo(newdev = device):
19
  currentDevice = RandomTensor.get_device();
20
  tensorExample = RandomTensor.to(newdev)
 
 
 
21
 
22
  tocpu = tensorExample.cpu().squeeze().half().tolist()
23
 
 
18
  def sysinfo(newdev = device):
19
  currentDevice = RandomTensor.get_device();
20
  tensorExample = RandomTensor.to(newdev)
21
+ .norm(p=2, dim=1, keepdim=True) # Apply an operation similar to l2_norm
22
+ .unsqueeze(-1) # Add an extra dimension
23
+ .to(newdev)
24
 
25
  tocpu = tensorExample.cpu().squeeze().half().tolist()
26