attributes-as-operators icon indicating copy to clipboard operation
attributes-as-operators copied to clipboard

Confusion in the Dataloader

Open ASMIftekhar opened this issue 4 years ago • 0 comments

Thanks a lot for your beautiful work. While looking into the repository I got confused with something. In data/dataset.py for commutative reguralizer:

def sample_affordance(self, attr, obj): new_attr = np.random.choice(self.obj_affordance[obj]) if new_attr==attr: return self.sample_affordance(attr, obj) return self.attr2idx[new_attr]

This function is called in line 157 by : inv_attr = self.sample_train_affordance(attr, obj) # attribute for inverse regularizer comm_attr = self.sample_affordance(inv_attr, obj) # attribute for commutative regularizer But inv_attr is the id of an attribute and in function sample_affordance it is getting compared with the name of the attribute which seems to be problematic. Can you have a look into this?

ASMIftekhar avatar May 18 '20 16:05 ASMIftekhar