dgs.models.embedding_generator.torchreid.TorchreidEmbeddingGenerator.forward¶
- TorchreidEmbeddingGenerator.forward(ds: State) torch.Tensor [source]¶
Predict embeddings given some input.
Notes
Torchreid models will return different results based on whether they are in eval or training mode. Make sure forward is only called in the evaluation mode.
- Parameters:
ds – A
State
containing the cropped image as input for the model.Image
or FloatTensor of shape[B x C x w x h]
.- Returns:
[B x E]
.- Return type:
A batch of embeddings as tensor of shape