morinop commited on
Commit
dd6daed
1 Parent(s): b450e69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,8 +22,8 @@ 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.numpy().tolist())
26
- print(model.resnet.embedder.embedder.convolution.weight.data.numpy().tolist())
27
  return bn_data
28
 
29
  def update_bn(image):
@@ -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.numpy().tolist())
26
+ # print(model.resnet.embedder.embedder.convolution.weight.data.numpy().tolist())
27
  return bn_data
28
 
29
  def update_bn(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())