You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "Eval_ImgCap_BLIP.py", line 120, in evaluate
captions = t_model.generate(adv_images, sample=False, num_beams=config['num_beams'],
File "/home/czh/UAP_VLP-main/models/XVLM/model_captioning.py", line 130, in generate
outputs = self.text_decoder.generate(input_ids=input_ids, #(8,4)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/transformers/generation/utils.py", line 1627, in generate
return self.beam_search(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/transformers/generation/utils.py", line 2932, in beam_search
outputs = self(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 1311, in forward
outputs = self.bert(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 1058, in forward
encoder_outputs = self.encoder(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 603, in forward
layer_outputs = layer_module(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 505, in forward
cross_attention_outputs = self.crossattention(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 407, in forward
self_outputs = self.self(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 306, in forward
attention_scores = torch.matmul(query_layer, key_layer.transpose(-1, -2))
RuntimeError: The size of tensor a (48) must match the size of tensor b (144) at non-singleton dimension 0
The text was updated successfully, but these errors were encountered:
File "Eval_ImgCap_BLIP.py", line 120, in evaluate
captions = t_model.generate(adv_images, sample=False, num_beams=config['num_beams'],
File "/home/czh/UAP_VLP-main/models/XVLM/model_captioning.py", line 130, in generate
outputs = self.text_decoder.generate(input_ids=input_ids, #(8,4)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/transformers/generation/utils.py", line 1627, in generate
return self.beam_search(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/transformers/generation/utils.py", line 2932, in beam_search
outputs = self(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 1311, in forward
outputs = self.bert(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 1058, in forward
encoder_outputs = self.encoder(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 603, in forward
layer_outputs = layer_module(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 505, in forward
cross_attention_outputs = self.crossattention(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 407, in forward
self_outputs = self.self(
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/czh/.conda/envs/sam/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/czh/UAP_VLP-main/models/XVLM/xbert.py", line 306, in forward
attention_scores = torch.matmul(query_layer, key_layer.transpose(-1, -2))
RuntimeError: The size of tensor a (48) must match the size of tensor b (144) at non-singleton dimension 0
The text was updated successfully, but these errors were encountered: