imgs: [B, 3, H, W] of torch.float32. - mean: [0.48145466, 0.4578275, 0.40821073] - std: [0.26862954, 0.26130258, 0.27577711] txt_ids: [B, L] of torch.long. Encoded by data.CLIPTokenizer.
(self, imgs, txt_ids)
| 708 | self.log_scale = nn.Parameter(math.log(1 / 0.07) * torch.ones([])) |
| 709 | |
| 710 | def forward(self, imgs, txt_ids): |
| 711 | """ |
| 712 | imgs: [B, 3, H, W] of torch.float32. |
| 713 | - mean: [0.48145466, 0.4578275, 0.40821073] |
| 714 | - std: [0.26862954, 0.26130258, 0.27577711] |
| 715 | txt_ids: [B, L] of torch.long. |
| 716 | Encoded by data.CLIPTokenizer. |
| 717 | """ |
| 718 | xi = self.visual(imgs) |
| 719 | xt = self.textual(txt_ids) |
| 720 | return xi, xt |
| 721 | |
| 722 | def param_groups(self): |
| 723 | groups = [{ |
nothing calls this directly
no outgoing calls
no test coverage detected