import torch from dataclasses import dataclass @dataclass class Prediction: coords: torch.Tensor # (B, T, N, 3) visibs: torch.Tensor # (B, T, N) def __post_init__(self): assert not self.coords.requires_grad and not self.visibs.requires_grad