File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ def elastic(
230
230
) -> Datapoint :
231
231
return self
232
232
233
- def to_grayscale (self , num_output_channels : int = 1 ) -> Datapoint :
233
+ def rgb_to_grayscale (self , num_output_channels : int = 1 ) -> Datapoint :
234
234
return self
235
235
236
236
def adjust_brightness (self , brightness_factor : float ) -> Datapoint :
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ def elastic(
169
169
)
170
170
return Image .wrap_like (self , output )
171
171
172
- def to_grayscale (self , num_output_channels : int = 1 ) -> Image :
172
+ def rgb_to_grayscale (self , num_output_channels : int = 1 ) -> Image :
173
173
output = self ._F .rgb_to_grayscale_image_tensor (
174
174
self .as_subclass (torch .Tensor ), num_output_channels = num_output_channels
175
175
)
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ def elastic(
173
173
)
174
174
return Video .wrap_like (self , output )
175
175
176
- def to_grayscale (self , num_output_channels : int = 1 ) -> Video :
176
+ def rgb_to_grayscale (self , num_output_channels : int = 1 ) -> Video :
177
177
output = self ._F .rgb_to_grayscale_image_tensor (
178
178
self .as_subclass (torch .Tensor ), num_output_channels = num_output_channels
179
179
)
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def rgb_to_grayscale(
46
46
if torch .jit .is_scripting () or is_simple_tensor (inpt ):
47
47
return rgb_to_grayscale_image_tensor (inpt , num_output_channels = num_output_channels )
48
48
elif isinstance (inpt , datapoints ._datapoint .Datapoint ):
49
- return inpt .to_grayscale (num_output_channels = num_output_channels )
49
+ return inpt .rgb_to_grayscale (num_output_channels = num_output_channels )
50
50
elif isinstance (inpt , PIL .Image .Image ):
51
51
return rgb_to_grayscale_image_pil (inpt , num_output_channels = num_output_channels )
52
52
else :
You can’t perform that action at this time.
0 commit comments