(cls, tensor: torch.Tensor)
| 26 | |
| 27 | @classmethod |
| 28 | def from_tensor(cls, tensor: torch.Tensor) -> "ErrorStats": |
| 29 | return cls( |
| 30 | mean=tensor.mean().item(), |
| 31 | std=tensor.std().item(), |
| 32 | max=tensor.max().item(), |
| 33 | min=tensor.min().item(), |
| 34 | ) |
| 35 | |
| 36 | def __str__(self): |
| 37 | return ( |
no outgoing calls
no test coverage detected