Another Codacy bug fix

This commit is contained in:
Christoph 2021-01-14 11:27:20 +01:00
parent e2867f696e
commit e39f307194

View File

@ -105,8 +105,8 @@ class GTLVQ(nn.Module):
if self.tpt == 'local_proj': if self.tpt == 'local_proj':
x_conform = x.unsqueeze(1).repeat_interleave(self.num_protos, x_conform = x.unsqueeze(1).repeat_interleave(self.num_protos,
1).unsqueeze(2) 1).unsqueeze(2)
dis, proj_x = self.local_tangent_projection( dis, proj_x = self.local_tangent_projection(x_conform)
x_conform, self.cls.prototypes, self.subspaces)
proj_x = proj_x.reshape(x.shape[0] * self.num_protos, proj_x = proj_x.reshape(x.shape[0] * self.num_protos,
self.feature_dim) self.feature_dim)
return proj_x, dis return proj_x, dis