Open MuhammadBilal121 opened 2 years ago
Could you share a code snippet to reproduce this error? Thanks.
Removing .tensor should work as the images is already a tensor and explicitly converting it to tensor again raises error.
images_input = (
(images if torch.is_tensor(images) else images.tensor) - self.pixel_mean
)
Can you share what error you are getting after this change.
I am having the same issue, did anyone know what's the solution?
I am trying to run the layout-xlm with customized dataset and facing this issue
Issue in the backbone of LayoutLMv2. I tried following but didnt worked out .
1)I tried to resolve issue by making changes in data_collactor batch['image'] = ImageList.from_tensors([feature['image'] for feature in features], 32
2)in modelling_layoutlmv2: def forward(self, images): images_input = ( (images if torch.is_tensor(images) else images.tensor) - self.pixel_mean ) / self.pixel_std