File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
pytorch_lightning/metrics/regression Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ class ExplainedVariance(Metric):
59
59
process_group:
60
60
Specify the process group on which synchronization is called. default: None (which selects the entire world)
61
61
62
+ Raises:
63
+ ValueError:
64
+ If ``multioutput`` is not one of ``"raw_values"``, ``"uniform_average"`` or ``"variance_weighted"``.
65
+
62
66
Example:
63
67
64
68
>>> from pytorch_lightning.metrics import ExplainedVariance
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ class PSNR(Metric):
51
51
process_group:
52
52
Specify the process group on which synchronization is called. default: None (which selects the entire world)
53
53
54
+ Raises:
55
+ ValueError:
56
+ If ``dim`` is not ``None`` and ``data_range`` is not given.
57
+
54
58
Example:
55
59
56
60
>>> from pytorch_lightning.metrics import PSNR
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ class R2Score(Metric):
66
66
process_group:
67
67
Specify the process group on which synchronization is called. default: None (which selects the entire world)
68
68
69
+ Raises:
70
+ ValueError:
71
+ If ``adjusted`` parameter is not an integer larger or equal to 0.
72
+ ValueError:
73
+ If ``multioutput`` is not one of ``"raw_values"``, ``"uniform_average"`` or ``"variance_weighted"``.
74
+
69
75
Example:
70
76
71
77
>>> from pytorch_lightning.metrics import R2Score
@@ -102,7 +108,7 @@ def __init__(
102
108
self .num_outputs = num_outputs
103
109
104
110
if adjusted < 0 or not isinstance (adjusted , int ):
105
- raise ValueError ('`adjusted` parameter should be an integer larger or' ' equal to 0.' )
111
+ raise ValueError ('`adjusted` parameter should be an integer larger or equal to 0.' )
106
112
self .adjusted = adjusted
107
113
108
114
allowed_multioutput = ('raw_values' , 'uniform_average' , 'variance_weighted' )
You can’t perform that action at this time.
0 commit comments