(self, x)
| 122 | self.quantize_interface = quantize_interface |
| 123 | |
| 124 | def encode(self, x): |
| 125 | # get batch size from data and replicate sos_token |
| 126 | c = torch.ones(x.shape[0], 1)*self.sos_token |
| 127 | c = c.long().to(x.device) |
| 128 | if self.quantize_interface: |
| 129 | return c, None, [None, None, c] |
| 130 | return c |
nothing calls this directly
no outgoing calls
no test coverage detected