File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ class Frame(Iterable):
3939 """The duration of the frame, in seconds (float)."""
4040
4141 def __post_init__ (self ):
42+ # This is called after __init__() when a Frame is created. We can run
43+ # input validation checks here.
4244 if not self .data .ndim == 3 :
4345 raise ValueError (f"data must be 3-dimensional, got { self .data .shape = } " )
4446 self .pts_seconds = float (self .pts_seconds )
@@ -64,6 +66,8 @@ class FrameBatch(Iterable):
6466 """The duration of the frame, in seconds (1-D ``torch.Tensor`` of floats)."""
6567
6668 def __post_init__ (self ):
69+ # This is called after __init__() when a FrameBatch is created. We can
70+ # run input validation checks here.
6771 if self .data .ndim < 4 :
6872 raise ValueError (
6973 f"data must be at least 4-dimensional. Got { self .data .shape = } "
You can’t perform that action at this time.
0 commit comments