def forward(self, x):
    (x, features) = self.hybrid_model(x)
    x = self.patch_embeddings(x)
    x = x.flatten(2)
    x = x.transpose((- 1), (- 2))
    embeddings = (x + self.position_embeddings)
    embeddings = self.dropout(embeddings)
    return (embeddings, features)
def forward(self, x):
    (x, features) = self.hybrid_model(x)
    x = self.patch_embeddings(x)
    x = x.flatten(2)
    x = x.transpose((- 1), (- 2))
    embeddings = (x + self.position_embeddings)
    embeddings = self.dropout(embeddings)
    return (embeddings, features)