Some questiones in sma.py
Closed this issue · 0 comments
zhousheng97 commented
❓ Questions and Help
Hello, I noticed that some functions (self.process_text_embedding/self.process_text_embedding) in the sma.py are missing. The details are as follows:
_, s_o, s_oo, s_ot, s_t, s_tt, s_to = self.process_text_embedding(sample_list)
obj_encoded_feats = self._forward_obj_encoding(sample_list)
ocr_encoded_feats = self._forward_ocr_encoding(sample_list)
g_o = self.process_feature_embedding(
"image", sample_list, s_o, s_homo=s_oo, s_hetero=s_ot,
pre_ques_embed=sample_list.text, obj_feats=obj_encoded_feats, ocr_feats=ocr_encoded_feats
)
g_t, updated_ocr = self.process_feature_embedding(
"context", sample_list, s_t, s_homo=s_tt, s_hetero=s_to,
pre_ques_embed=sample_list.text, obj_feats=obj_encoded_feats, ocr_feats=ocr_encoded_feats
) # torch.Size([128, 350])
Could you please supplement this code?