Skip to content

Bug while running pose only variant with default train_config #10

@umurotti

Description

@umurotti

Hey there,

I think there is a tiny bug while running the pose only variant with given default settings.

transformer_unimodal returns only action features.

Verb and noun features are missing.

This causes the following error in train_model.py:

local variable 'verb_output' referenced before assignment
File "./HandFormer/HandFormer/train_model.py", line 434, in train
verb_category_loss = self.loss_v(verb_output, batch_verb_label) if self.arg.add_verb_loss else 0
UnboundLocalError: local variable 'verb_output' referenced before assignment

Should the following lines to unimodal transformer:

    batch_out_verb_feature=torch.flatten(batch_seq_aout_feature[:,0],1,-1)
    batch_out_noun_feature=torch.flatten(batch_seq_aout_feature[:,1],1,-1)
    batch_out_action_feature=torch.flatten(batch_seq_aout_feature[:,2],1,-1)

plus additional classifier heads to hf_pose be added to solve the issue?

     # Classifiers
    self.classifier = nn.Linear(embedding_dim_final, num_classes)
    self.classifier_verb = nn.Linear(embedding_dim_final, num_verbs)
    self.classifier_noun = nn.Linear(embedding_dim_final, num_nouns)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions