File size: 351 Bytes
2e1dc7f
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from torch import Tensor
from dataclasses import dataclass
from typing import Optional


@dataclass(repr=False)
class EmbeddedCondition:
    data: Tensor
    mask: Optional[Tensor]

    def __repr__(self) -> str:
        return (f"data: {list(self.data.shape)}; mask: "
                f"{list(self.mask.shape) if self.mask is not None else 'None'}")