Spaces:
Runtime error
Runtime error
update app.py
Browse files
app.py
CHANGED
@@ -43,6 +43,12 @@ model = LitResnet(lr=0.05).load_from_checkpoint("weights_92.ckpt")
|
|
43 |
|
44 |
device = torch.device("cpu")
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
# Get the misclassified data from test dataset
|
47 |
misclassified_data = get_misclassified_data2(model, device, 20)
|
48 |
|
|
|
43 |
|
44 |
device = torch.device("cpu")
|
45 |
|
46 |
+
# Denormalize the data using test mean and std deviation
|
47 |
+
inv_normalize = transforms.Normalize(
|
48 |
+
mean=[-0.50/0.23, -0.50/0.23, -0.50/0.23],
|
49 |
+
std=[1/0.23, 1/0.23, 1/0.23]
|
50 |
+
)
|
51 |
+
|
52 |
# Get the misclassified data from test dataset
|
53 |
misclassified_data = get_misclassified_data2(model, device, 20)
|
54 |
|