Closed yezhengli-Mr9 closed 3 years ago
I'm not 100% sure, but if you refer to the encoded representation before the cross-modality interaction module, then probably you need to hack these two lines and save these intermediate representations: https://github.com/airsplay/lxmert/blob/0db1182b9030da3ce41f17717cc628e1cd0a95d5/src/lxrt/modeling.py#L554-L559
If you need the ones after the cross-modality interaction module, then just take these two: https://github.com/airsplay/lxmert/blob/0db1182b9030da3ce41f17717cc628e1cd0a95d5/src/lxrt/modeling.py#L566
I'm not 100% sure, but if you refer to the encoded representation before the cross-modality interaction module, then probably you need to hack these two lines and save these intermediate representations:
If you need the ones after the cross-modality interaction module, then just take these two:
Sort of help, thanks! @zhmd
Any suggestion of getting embeddings of language encoder and Object-Relationship Encoder? I refers to
output_hidden_state
mentioned in this blog as well as the official tutorial.