morinop commited on
Commit
6882504
1 Parent(s): 02d0cf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,7 +22,7 @@ def print_bn():
22
  bn_data.extend(m.running_var.data.numpy().tolist())
23
  bn_data.append(m.momentum)
24
  print(len(bn_data))
25
- bn_data.extend(model.resnet.embedder.embedder.convolution.weight.data.reshape(-1).numpy().tolist())
26
  # print(model.resnet.embedder.embedder.convolution.weight.data.numpy().tolist())
27
  return bn_data
28
 
@@ -50,8 +50,8 @@ def greet(image):
50
  bn_data = print_bn()
51
  return ','.join([f'{x:.2f}' for x in bn_data])
52
  else:
53
- conv_layer = model.resnet.embedder.embedder.convolution
54
- conv_layer.weight.data = torch.ones_like(conv_layer.weight.data)
55
  print(type(image))
56
  image = torch.tensor(image).float()
57
  print(image.min(), image.max())
 
22
  bn_data.extend(m.running_var.data.numpy().tolist())
23
  bn_data.append(m.momentum)
24
  print(len(bn_data))
25
+ # bn_data.extend(model.resnet.embedder.embedder.convolution.weight.data.reshape(-1).numpy().tolist())
26
  # print(model.resnet.embedder.embedder.convolution.weight.data.numpy().tolist())
27
  return bn_data
28
 
 
50
  bn_data = print_bn()
51
  return ','.join([f'{x:.2f}' for x in bn_data])
52
  else:
53
+ # conv_layer = model.resnet.embedder.embedder.convolution
54
+ # conv_layer.weight.data = torch.ones_like(conv_layer.weight.data)
55
  print(type(image))
56
  image = torch.tensor(image).float()
57
  print(image.min(), image.max())