Feature-Generating-Networks
Feature-Generating-Networks copied to clipboard
input for self.final_classifier in Class Trainer contains attribute information?
Hi, Abhipanda4!
Thanks for sharing codes. I find something wrong about the input variables for self.final_classifier in Class Trainer. I think this classifier should't be trained by using any attribute information of unseen classes, otherwise it will violate the zero-shot learning setting. Is that so?
`
def fit_final_classifier(self, img_features, label_attr, label_idx):
img_features = autograd.Variable(img_features.float()).to(self.device)
label_attr = autograd.Variable(label_attr.float()).to(self.device)
label_idx = label_idx.to(self.device)
X_inp = self.get_conditional_input(img_features, label_attr) **# ?**
Y_pred = self.final_classifier(X_inp)
self.optim_final_cls.zero_grad()
loss = self.criterion_cls(Y_pred, label_idx)
loss.backward()
self.optim_final_cls.step()
return loss.item()
`
Yes, this seems very confusing to me as well. Did you make sense of it?