Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def predict(model, image_tensor):
|
|
51 |
pred = torch.argmax(probs).item()
|
52 |
return probs, pred
|
53 |
|
54 |
-
def unlearn(model, image_tensor, label_idx, learning_rate, steps=
|
55 |
"""
|
56 |
Performs targeted unlearning by updating only the final fully connected layer.
|
57 |
The negative cross-entropy loss drives the confidence for the target class down.
|
|
|
51 |
pred = torch.argmax(probs).item()
|
52 |
return probs, pred
|
53 |
|
54 |
+
def unlearn(model, image_tensor, label_idx, learning_rate, steps=10):
|
55 |
"""
|
56 |
Performs targeted unlearning by updating only the final fully connected layer.
|
57 |
The negative cross-entropy loss drives the confidence for the target class down.
|