Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,6 @@ import timm
|
|
10 |
feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-101")
|
11 |
model = ResNetForImageClassification.from_pretrained("microsoft/resnet-101")
|
12 |
model.eval()
|
13 |
-
|
14 |
-
|
15 |
-
print(model)
|
16 |
-
|
17 |
-
print(model.resnet.embedder.embedder.convolution.weight.data)
|
18 |
-
|
19 |
import os
|
20 |
|
21 |
def print_bn():
|
@@ -29,6 +23,7 @@ def print_bn():
|
|
29 |
bn_data.append(m.momentum)
|
30 |
print(len(bn_data))
|
31 |
bn_data.extend(model.resnet.embedder.embedder.convolution.weight.data.numpy().tolist())
|
|
|
32 |
return bn_data
|
33 |
|
34 |
def update_bn(image):
|
|
|
10 |
feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-101")
|
11 |
model = ResNetForImageClassification.from_pretrained("microsoft/resnet-101")
|
12 |
model.eval()
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
import os
|
14 |
|
15 |
def print_bn():
|
|
|
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):
|