Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_image_features 段错误(吐核) #351

Open
yanqiangmiffy opened this issue Aug 30, 2024 · 0 comments
Open

get_image_features 段错误(吐核) #351

yanqiangmiffy opened this issue Aug 30, 2024 · 0 comments

Comments

@yanqiangmiffy
Copy link

段错误(吐核)

        inputs = self.clip_processor(images=image, return_tensors="pt").to(self.device)
        print("clip_processor",inputs)
        print("clip_processor",inputs['pixel_values'].shape)
        image_features = self.clip_model.get_image_features(pixel_values=inputs['pixel_values'])
        print("image_features", image_features.shape)
clip_processor {'pixel_values': tensor([[[[1.9011, 1.9303, 1.9011,  ..., 1.9011, 1.9011, 1.8865],
          [1.9303, 1.9303, 1.9303,  ..., 1.9011, 1.9303, 1.8865],
          [1.9011, 1.9303, 1.9011,  ..., 1.9011, 1.9303, 1.8865],
          ...,
          [1.9011, 1.9303, 1.9011,  ..., 1.8865, 1.9303, 1.8865],
          [1.9011, 1.9303, 1.9303,  ..., 1.9303, 1.9303, 1.8865],
          [1.9011, 1.9011, 1.9011,  ..., 1.8865, 1.9303, 1.9011]],

         [[1.8948, 1.9098, 1.9098,  ..., 1.9098, 1.9998, 1.8798],
          [1.9248, 2.0449, 2.0299,  ..., 1.9098, 2.0599, 1.8948],
          [1.8948, 1.9248, 1.9098,  ..., 1.9098, 2.0599, 1.9248],
          ...,
          [1.8948, 1.9848, 1.8948,  ..., 1.8798, 2.0299, 1.8798],
          [1.9248, 2.0449, 1.9248,  ..., 1.9698, 2.0599, 1.8948],
          [1.9098, 1.9698, 1.8948,  ..., 1.8648, 2.0149, 1.8798]],

         [[2.1032, 2.1175, 2.1032,  ..., 2.0890, 2.1175, 2.0748],
          [2.1175, 2.1459, 2.1459,  ..., 2.0890, 2.1459, 2.0748],
          [2.0890, 2.1032, 2.0890,  ..., 2.0890, 2.1459, 2.0748],
          ...,
          [2.0748, 2.1459, 2.0890,  ..., 2.0748, 2.1317, 2.0748],
          [2.0890, 2.1459, 2.1175,  ..., 2.1459, 2.1459, 2.0606],
          [2.1032, 2.1175, 2.0890,  ..., 2.0606, 2.1175, 2.0606]]]],
       device='cuda:0')}
clip_processor torch.Size([1, 3, 224, 224])
段错误(吐核)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant