osc.models.models.ModelOutput

class ModelOutput(f_backbone: torch.Tensor, f_global: torch.Tensor, f_slots: Optional[torch.Tensor], p_global: torch.Tensor, p_slots: Optional[torch.Tensor])[source]

Bases: NamedTuple

Model output.

Fields:

  • f_backbone: backbone features, shape [B N C]

  • f_global: global features, shape [B C]

  • f_slots: object features, shape [B C]

  • p_global: global projections, shape [B S C]

  • p_slots: object projections, shape [B S C]

Create new instance of ModelOutput(f_backbone, f_global, f_slots, p_global, p_slots)

Methods

count

Return number of occurrences of value.

index

Return first index of value.

Attributes

f_backbone

Alias for field number 0

f_global

Alias for field number 1

f_slots

Alias for field number 2

p_global

Alias for field number 3

p_slots

Alias for field number 4

__add__(value, /)

Return self+value.

__mul__(value, /)

Return self*value.

count(value, /)

Return number of occurrences of value.

f_backbone: torch.Tensor

Alias for field number 0

f_global: torch.Tensor

Alias for field number 1

f_slots: Optional[torch.Tensor]

Alias for field number 2

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

p_global: torch.Tensor

Alias for field number 3

p_slots: Optional[torch.Tensor]

Alias for field number 4