-
Notifications
You must be signed in to change notification settings - Fork 110
RunTime Error of metric 'scene', when decoding with BertLMHeadModel #156
Copy link
Copy link
Open
Description
When I tried to evaluate a bunch of generated videos on the metric 'scene', I encountered the following problem:
File "/xxx/anaconda3/envs/vbench/lib/python3.10/site-packages/vbench/third_party/tag2Text/tag2text.py", line 192, in generate
outputs = self.text_decoder.generate(input_ids=input_ids,
File "/xxx/anaconda3/envs/vbench/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1928, in __getattr__
raise AttributeError(
AttributeError: 'BertLMHeadModel' object has no attribute 'generate'
And it seems to make sense for me:
- In the function
compute_sceneofscene.py, we define model through functiontag2text_captioninthird_party/tag2Text/tag2text.py, which is linked to moduleTag2Text_Caption. - In
Tag2Text_Caption, we claim thatself.text_decoder = BertLMHeadModel(config=decoder_config), and callself.text_decoder.generateno matter whethersample=Truein functiongenerate. BertLMHeadModelinthird_party/tag2Text/med.pyactually does not have such functiongenerate, and its ancestorsBertPreTrainedModelandPreTrainedModelalso do not definegenerate.
Could anyone help me to solve the problem?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels