cleaned up for submission
This commit is contained in:
@@ -124,7 +124,6 @@ class LinearFiltration(Strategy):
|
||||
if self.A is None:
|
||||
self._compute_A(
|
||||
model = model,
|
||||
#num_classes = num_classes,
|
||||
loader = forget_loader,
|
||||
device = device
|
||||
)
|
||||
@@ -147,6 +146,9 @@ class LinearFiltration(Strategy):
|
||||
A_inv = torch.linalg.pinv(A_t, rcond=1e-2)
|
||||
# 11
|
||||
W_temp = B_z @ A_inv @ W
|
||||
# Linear (Normalisation)filtration is done here,
|
||||
# next steps are added for safe automated evaluations
|
||||
|
||||
# with one class removed, we have a head W_temp for 19 classes.
|
||||
# but we have loaders for 20 classes for evaluation. so ,
|
||||
# map K-1 W back to K x K.
|
||||
@@ -164,6 +166,7 @@ class LinearFiltration(Strategy):
|
||||
# neutralise forget bias if exists
|
||||
if clf.bias is not None:
|
||||
n_bias = clf.bias.data.clone()
|
||||
# push it down to negative
|
||||
n_bias[forget_index] = -1e9
|
||||
clf.bias.copy_(n_bias)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user