Simplify Batch type

This commit is contained in:
henryruhs
2025-02-14 16:19:14 +01:00
parent a971506271
commit 650551c19b
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -3,11 +3,10 @@ from typing import Any, Tuple, TypeAlias
from numpy.typing import NDArray
from torch import Tensor
Batch : TypeAlias = Tuple[Tensor, Tensor]
Embedding : TypeAlias = NDArray[Any]
EmbeddingDataset : TypeAlias = NDArray[Embedding]
FaceLandmark5 : TypeAlias = NDArray[Any]
VisionFrame : TypeAlias = NDArray[Any]
VisionTensor : TypeAlias = Tensor
Batch : TypeAlias = Tuple[VisionTensor, VisionTensor]
+2 -2
View File
@@ -5,6 +5,8 @@ from numpy.typing import NDArray
from torch import Tensor
from torch.nn import Module
Batch : TypeAlias = Tuple[Tensor, Tensor, Tensor]
ImagePathList : TypeAlias = List[str]
ImagePathSet : TypeAlias = Dict[str, ImagePathList]
@@ -22,8 +24,6 @@ VisionFrame : TypeAlias = NDArray[Any]
LossTensor : TypeAlias = Tensor
VisionTensor : TypeAlias = Tensor
Batch : TypeAlias = Tuple[VisionTensor, VisionTensor, Tensor]
GeneratorLossSet : TypeAlias = Dict[str, Tensor]
DiscriminatorLossSet : TypeAlias = Dict[str, Tensor]