Skip to content

Commit 496bded

Browse files
cpuhrschfacebook-github-bot
authored andcommitted
[fbsync] put back error on warnings for sphinx (#3671)
Reviewed By: NicolasHug Differential Revision: D28169166 fbshipit-source-id: 5fa1fb8e884e9ecfb8f274215f284c5f435fd0e4
1 parent 5b15a2f commit 496bded

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS = # -W # turn warnings into errors
5+
SPHINXOPTS = -W # turn warnings into errors
66
SPHINXBUILD = sphinx-build
77
SPHINXPROJ = torchvision
88
SOURCEDIR = source

torchvision/ops/deform_conv.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,21 @@ def deform_conv2d(
2929
3030
Args:
3131
input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor
32-
offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width,
33-
out_height, out_width]): offsets to be applied for each position in the
34-
convolution kernel.
35-
weight (Tensor[out_channels, in_channels // groups, kernel_height, kernel_width]):
36-
convolution weights, split into groups of size (in_channels // groups)
32+
offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, out_height, out_width]):
33+
offsets to be applied for each position in the convolution kernel.
34+
weight (Tensor[out_channels, in_channels // groups, kernel_height, kernel_width]): convolution weights,
35+
split into groups of size (in_channels // groups)
3736
bias (Tensor[out_channels]): optional bias of shape (out_channels,). Default: None
3837
stride (int or Tuple[int, int]): distance between convolution centers. Default: 1
3938
padding (int or Tuple[int, int]): height/width of padding of zeroes around
4039
each image. Default: 0
4140
dilation (int or Tuple[int, int]): the spacing between kernel elements. Default: 1
42-
mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width,
43-
out_height, out_width]): masks to be applied for each position in the
44-
convolution kernel. Default: None
41+
mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]):
42+
masks to be applied for each position in the convolution kernel. Default: None
4543
4644
Returns:
4745
Tensor[batch_sz, out_channels, out_h, out_w]: result of convolution
4846
49-
5047
Examples::
5148
>>> input = torch.rand(4, 3, 10, 10)
5249
>>> kh, kw = 3, 3

torchvision/transforms/functional.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,8 @@ def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor:
744744
745745
Args:
746746
img (PIL Image or Tensor): Image to be adjusted.
747-
If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
748-
where ... means it can have an arbitrary number of leading dimensions.
747+
If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
748+
where ... means it can have an arbitrary number of leading dimensions.
749749
brightness_factor (float): How much to adjust the brightness. Can be
750750
any non negative number. 0 gives a black image, 1 gives the
751751
original image while 2 increases the brightness by a factor of 2.
@@ -764,8 +764,8 @@ def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor:
764764
765765
Args:
766766
img (PIL Image or Tensor): Image to be adjusted.
767-
If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
768-
where ... means it can have an arbitrary number of leading dimensions.
767+
If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
768+
where ... means it can have an arbitrary number of leading dimensions.
769769
contrast_factor (float): How much to adjust the contrast. Can be any
770770
non negative number. 0 gives a solid gray image, 1 gives the
771771
original image while 2 increases the contrast by a factor of 2.
@@ -784,8 +784,8 @@ def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor:
784784
785785
Args:
786786
img (PIL Image or Tensor): Image to be adjusted.
787-
If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
788-
where ... means it can have an arbitrary number of leading dimensions.
787+
If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
788+
where ... means it can have an arbitrary number of leading dimensions.
789789
saturation_factor (float): How much to adjust the saturation. 0 will
790790
give a black and white image, 1 will give the original image while
791791
2 will enhance the saturation by a factor of 2.
@@ -815,9 +815,9 @@ def adjust_hue(img: Tensor, hue_factor: float) -> Tensor:
815815
816816
Args:
817817
img (PIL Image or Tensor): Image to be adjusted.
818-
If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
819-
where ... means it can have an arbitrary number of leading dimensions.
820-
If img is PIL Image mode "1", "L", "I", "F" and modes with transparency (alpha channel) are not supported.
818+
If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
819+
where ... means it can have an arbitrary number of leading dimensions.
820+
If img is PIL Image mode "1", "L", "I", "F" and modes with transparency (alpha channel) are not supported.
821821
hue_factor (float): How much to shift the hue channel. Should be in
822822
[-0.5, 0.5]. 0.5 and -0.5 give complete reversal of hue channel in
823823
HSV space in positive and negative direction respectively.
@@ -848,9 +848,9 @@ def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor:
848848
849849
Args:
850850
img (PIL Image or Tensor): PIL Image to be adjusted.
851-
If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
852-
where ... means it can have an arbitrary number of leading dimensions.
853-
If img is PIL Image, modes with transparency (alpha channel) are not supported.
851+
If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
852+
where ... means it can have an arbitrary number of leading dimensions.
853+
If img is PIL Image, modes with transparency (alpha channel) are not supported.
854854
gamma (float): Non negative real number, same as :math:`\gamma` in the equation.
855855
gamma larger than 1 make the shadows darker,
856856
while gamma smaller than 1 make dark regions lighter.
@@ -1286,8 +1286,8 @@ def adjust_sharpness(img: Tensor, sharpness_factor: float) -> Tensor:
12861286
12871287
Args:
12881288
img (PIL Image or Tensor): Image to be adjusted.
1289-
If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1290-
where ... means it can have an arbitrary number of leading dimensions.
1289+
If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1290+
where ... means it can have an arbitrary number of leading dimensions.
12911291
sharpness_factor (float): How much to adjust the sharpness. Can be
12921292
any non negative number. 0 gives a blurred image, 1 gives the
12931293
original image while 2 increases the sharpness by a factor of 2.

0 commit comments

Comments
 (0)