@@ -28,7 +28,7 @@ class ChannelReducer:
28
28
reduction_alg (str or callable, optional): The desired dimensionality
29
29
reduction algorithm to use. The default ``reduction_alg`` is set to NMF
30
30
from sklearn, which requires users to put inputs on CPU before passing them
31
- to `` fit_transform` `.
31
+ to :func:`ChannelReducer. fit_transform`.
32
32
Default: ``NMF``
33
33
**kwargs (optional): Arbitrary keyword arguments used by the specified
34
34
reduction_alg.
@@ -76,14 +76,14 @@ def fit_transform(
76
76
77
77
Args:
78
78
79
- tensor (tensor ): A tensor to perform dimensionality reduction on.
79
+ tensor (torch.Tensor ): A tensor to perform dimensionality reduction on.
80
80
swap_2nd_and_last_dims (bool, optional): If ``True``, input channels are
81
81
expected to be in the second dimension unless the input tensor has a
82
82
shape of CHW.
83
83
Default: ``True``.
84
84
85
85
Returns:
86
- * tensor*: A tensor with one of it's dimensions reduced.
86
+ tensor: A tensor with one of it's dimensions reduced.
87
87
"""
88
88
89
89
if x .dim () == 3 and swap_2nd_and_last_dims :
@@ -138,12 +138,12 @@ def posneg(x: torch.Tensor, dim: int = 0) -> torch.Tensor:
138
138
139
139
Args:
140
140
141
- x (tensor ): A tensor to make positive.
141
+ x (torch.Tensor ): A tensor to make positive.
142
142
dim (int, optional): The dimension to concatinate the two tensor halves at.
143
143
Default: ``0``
144
144
145
145
Returns:
146
- tensor (torch.tensor ): A positive tensor for one-sided dimensionality
146
+ tensor (torch.Tensor ): A positive tensor for one-sided dimensionality
147
147
reduction.
148
148
"""
149
149
0 commit comments