shengyuzhang / DeVLBert

DeVLBert: Learning Deconfounded Visio-Linguistic Representations
27 stars 2 forks source link

What is the "causal_label" in the source code? #4

Closed ghost closed 2 years ago

ghost commented 2 years ago

causal_prediction_v2t_loss, causal_prediction_t2v_loss= self.cls( sequence_output_t, sequence_output_v, pooled_output_t, pooled_output_v, causal_sequence_output_v, causal_sequence_output_v2t, causal_label_v, image_target, causal_sequence_output_t, causal_sequence_output_t2v, causal_label_t ) Thanks for your great code. I noticed that you calculate the causal prediction loss , however I couldnot find the causal label where it defined. Would you please help me?

jiangtann commented 2 years ago

At line 24, we import ConceptCapLoaderTrain and ConceptCapLoaderVal, where we define at DeVLBert/devlbert/datasets/concept_cap_dataset.py. You can find how we generate causal label there (search causal_label_t and causal_label_v at the page).