rrg92 commited on
Commit
7b9d50b
·
1 Parent(s): 23b77c7
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -17,10 +17,7 @@ RandomTensor.to(device)
17
 
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
 
 
17
 
18
  def sysinfo(newdev = device):
19
  currentDevice = RandomTensor.get_device();
20
+ tensorExample = RandomTensor.to(newdev).norm(p=2, dim=1, keepdim=True).unsqueeze(-1).to(newdev)
 
 
 
21
 
22
  tocpu = tensorExample.cpu().squeeze().half().tolist()
23