File tree Expand file tree Collapse file tree 5 files changed +7
-8
lines changed Expand file tree Collapse file tree 5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class IntegralLoss(base.Loss):
36
36
$M$ is the number of samples in monte carlo integration.
37
37
38
38
Args:
39
- reduction (str , optional): Reduction method. Defaults to "mean".
39
+ reduction (Literal["mean", "sum"] , optional): Reduction method. Defaults to "mean".
40
40
weight (Optional[Union[float, Dict[str, float]]]): Weight for loss. Defaults to None.
41
41
42
42
Examples:
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class L1Loss(base.Loss):
34
34
$$
35
35
36
36
Args:
37
- reduction (str , optional): Reduction method. Defaults to "mean".
37
+ reduction (Literal["mean", "sum"] , optional): Reduction method. Defaults to "mean".
38
38
weight (Optional[Union[float, Dict[str, float]]]): Weight for loss. Defaults to None.
39
39
40
40
Examples:
@@ -85,7 +85,7 @@ class PeriodicL1Loss(base.Loss):
85
85
"""Class for periodic l1 loss.
86
86
87
87
Args:
88
- reduction (str , optional): Reduction method. Defaults to "mean".
88
+ reduction (Literal["mean", "sum"] , optional): Reduction method. Defaults to "mean".
89
89
"""
90
90
91
91
def __init__ (
Original file line number Diff line number Diff line change @@ -109,8 +109,8 @@ class L2RelLoss(base.Loss):
109
109
$$
110
110
L =
111
111
\begin{cases}
112
- \dfrac{1}{N}\sum\limits_{i=1}^{N}{\dfrac{\Vert \bm {X_i}-\bm {Y_i}\Vert_2}{\Vert \bm {Y_i}\Vert_2}}, & \text{if reduction='mean'} \\
113
- \sum\limits_{i=1}^{N}{\dfrac{\Vert \bm {X_i}-\bm {Y_i}\Vert_2}{\Vert \bm {Y_i}\Vert_2}}, & \text{if reduction='sum'}
112
+ \dfrac{1}{N}\sum\limits_{i=1}^{N}{\dfrac{\Vert \mathbf {X_i}-\mathbf {Y_i}\Vert_2}{\Vert \mathbf {Y_i}\Vert_2}}, & \text{if reduction='mean'} \\
113
+ \sum\limits_{i=1}^{N}{\dfrac{\Vert \mathbf {X_i}-\mathbf {Y_i}\Vert_2}{\Vert \mathbf {Y_i}\Vert_2}}, & \text{if reduction='sum'}
114
114
\end{cases}
115
115
$$
116
116
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class MSELoss(base.Loss):
35
35
$$
36
36
37
37
Args:
38
- reduction (str , optional): Reduction method. Defaults to "mean".
38
+ reduction (Literal["mean", "sum"] , optional): Reduction method. Defaults to "mean".
39
39
weight (Optional[Union[float, Dict[str, float]]]): Weight for loss. Defaults to None.
40
40
41
41
Examples:
@@ -130,7 +130,7 @@ class PeriodicMSELoss(base.Loss):
130
130
"""Class for periodic mean squared error loss.
131
131
132
132
Args:
133
- reduction (str , optional): Reduction method. Defaults to "mean".
133
+ reduction (Literal["mean", "sum"] , optional): Reduction method. Defaults to "mean".
134
134
weight (Optional[Union[float, Dict[str, float]]]): Weight for loss. Defaults to None.
135
135
"""
136
136
Original file line number Diff line number Diff line change @@ -292,7 +292,6 @@ class Visualizer3D(base.Visualizer):
292
292
output_expr (Dict[str, Callable]): Output expression.
293
293
batch_size (int, optional): Batch size of data when computing result in visu.py. Defaults to 64.
294
294
label_dict (Dict[str, np.ndarray]): Label dict.
295
- transforms (Optional[Dict[str, ]]): Transformer dict.
296
295
time_list (Optional[Tuple[float, ...]]): Time list.
297
296
num_timestamps (int, optional): Number of timestamps.
298
297
prefix (str, optional): Prefix for output file.
You can’t perform that action at this time.
0 commit comments