@@ -142,15 +142,13 @@ def __deepcopy__(self: D, memo: Dict[int, Any]) -> D:
142142 # `BoundingBox.clone()`.
143143 return self .detach ().clone ().requires_grad_ (self .requires_grad ) # type: ignore[return-value]
144144
145- def horizontal_flip (self ) -> Datapoint :
145+ def _horizontal_flip (self ) -> Datapoint :
146146 return self
147147
148- def vertical_flip (self ) -> Datapoint :
148+ def _vertical_flip (self ) -> Datapoint :
149149 return self
150150
151- # TODO: We have to ignore override mypy error as there is torch.Tensor built-in deprecated op: Tensor.resize
152- # https://github.com/pytorch/pytorch/blob/e8727994eb7cdb2ab642749d6549bc497563aa06/torch/_tensor.py#L588-L593
153- def resize ( # type: ignore[override]
151+ def _resize (
154152 self ,
155153 size : List [int ],
156154 interpolation : Union [InterpolationMode , int ] = InterpolationMode .BILINEAR ,
@@ -159,13 +157,13 @@ def resize( # type: ignore[override]
159157 ) -> Datapoint :
160158 return self
161159
162- def crop (self , top : int , left : int , height : int , width : int ) -> Datapoint :
160+ def _crop (self , top : int , left : int , height : int , width : int ) -> Datapoint :
163161 return self
164162
165- def center_crop (self , output_size : List [int ]) -> Datapoint :
163+ def _center_crop (self , output_size : List [int ]) -> Datapoint :
166164 return self
167165
168- def resized_crop (
166+ def _resized_crop (
169167 self ,
170168 top : int ,
171169 left : int ,
@@ -177,15 +175,15 @@ def resized_crop(
177175 ) -> Datapoint :
178176 return self
179177
180- def pad (
178+ def _pad (
181179 self ,
182180 padding : List [int ],
183181 fill : Optional [Union [int , float , List [float ]]] = None ,
184182 padding_mode : str = "constant" ,
185183 ) -> Datapoint :
186184 return self
187185
188- def rotate (
186+ def _rotate (
189187 self ,
190188 angle : float ,
191189 interpolation : Union [InterpolationMode , int ] = InterpolationMode .NEAREST ,
@@ -195,7 +193,7 @@ def rotate(
195193 ) -> Datapoint :
196194 return self
197195
198- def affine (
196+ def _affine (
199197 self ,
200198 angle : Union [int , float ],
201199 translate : List [float ],
@@ -207,7 +205,7 @@ def affine(
207205 ) -> Datapoint :
208206 return self
209207
210- def perspective (
208+ def _perspective (
211209 self ,
212210 startpoints : Optional [List [List [int ]]],
213211 endpoints : Optional [List [List [int ]]],
@@ -217,51 +215,54 @@ def perspective(
217215 ) -> Datapoint :
218216 return self
219217
220- def elastic (
218+ def _elastic (
221219 self ,
222220 displacement : torch .Tensor ,
223221 interpolation : Union [InterpolationMode , int ] = InterpolationMode .BILINEAR ,
224222 fill : _FillTypeJIT = None ,
225223 ) -> Datapoint :
226224 return self
227225
228- def rgb_to_grayscale (self , num_output_channels : int = 1 ) -> Datapoint :
226+ def _rgb_to_grayscale (self , num_output_channels : int = 1 ) -> Datapoint :
229227 return self
230228
231- def adjust_brightness (self , brightness_factor : float ) -> Datapoint :
229+ def _adjust_brightness (self , brightness_factor : float ) -> Datapoint :
232230 return self
233231
234- def adjust_saturation (self , saturation_factor : float ) -> Datapoint :
232+ def _adjust_saturation (self , saturation_factor : float ) -> Datapoint :
235233 return self
236234
237- def adjust_contrast (self , contrast_factor : float ) -> Datapoint :
235+ def _adjust_contrast (self , contrast_factor : float ) -> Datapoint :
238236 return self
239237
240- def adjust_sharpness (self , sharpness_factor : float ) -> Datapoint :
238+ def _adjust_sharpness (self , sharpness_factor : float ) -> Datapoint :
241239 return self
242240
243- def adjust_hue (self , hue_factor : float ) -> Datapoint :
241+ def _adjust_hue (self , hue_factor : float ) -> Datapoint :
244242 return self
245243
246- def adjust_gamma (self , gamma : float , gain : float = 1 ) -> Datapoint :
244+ def _adjust_gamma (self , gamma : float , gain : float = 1 ) -> Datapoint :
247245 return self
248246
249- def posterize (self , bits : int ) -> Datapoint :
247+ def _posterize (self , bits : int ) -> Datapoint :
250248 return self
251249
252- def solarize (self , threshold : float ) -> Datapoint :
250+ def _solarize (self , threshold : float ) -> Datapoint :
253251 return self
254252
255- def autocontrast (self ) -> Datapoint :
253+ def _autocontrast (self ) -> Datapoint :
256254 return self
257255
258- def equalize (self ) -> Datapoint :
256+ def _equalize (self ) -> Datapoint :
259257 return self
260258
261- def invert (self ) -> Datapoint :
259+ def _invert (self ) -> Datapoint :
262260 return self
263261
264- def gaussian_blur (self , kernel_size : List [int ], sigma : Optional [List [float ]] = None ) -> Datapoint :
262+ def _gaussian_blur (self , kernel_size : List [int ], sigma : Optional [List [float ]] = None ) -> Datapoint :
263+ return self
264+
265+ def _normalize (self , mean : List [float ], std : List [float ], inplace : bool = False ) -> Datapoint :
265266 return self
266267
267268
0 commit comments