Skip to content

Commit

Permalink
Merge branch 'main' into port-grayscale
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier authored Sep 25, 2023
2 parents d405efb + 9ba2158 commit f172a66
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion references/segmentation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def compute(self):
return acc_global, acc, iu

def reduce_from_all_processes(self):
reduce_across_processes(self.mat)
self.mat = reduce_across_processes(self.mat).to(torch.int64)

def __str__(self):
acc_global, acc, iu = self.compute()
Expand Down
2 changes: 1 addition & 1 deletion test/test_datasets_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ def url_parametrization(*dataset_urls_and_ids_fns):
kinetics,
kitti,
places365,
sbu,
)
def test_url_is_accessible(url):
"""
Expand All @@ -379,7 +380,6 @@ def test_url_is_accessible(url):

@url_parametrization(
stanford_cars, # https://github.com/pytorch/vision/issues/7545
sbu, # https://github.com/pytorch/vision/issues/7964
)
@pytest.mark.xfail
def test_url_is_not_accessible(url):
Expand Down
2 changes: 1 addition & 1 deletion test/test_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def to_numpy(tensor):
inputs = list(map(to_numpy, inputs))
outputs = list(map(to_numpy, outputs))

ort_session = onnxruntime.InferenceSession(onnx_io.getvalue())
ort_session = onnxruntime.InferenceSession(onnx_io.getvalue(), providers=onnxruntime.get_available_providers())
# compute onnxruntime output prediction
ort_inputs = {ort_session.get_inputs()[i].name: inpt for i, inpt in enumerate(inputs)}
ort_outs = ort_session.run(None, ort_inputs)
Expand Down
2 changes: 1 addition & 1 deletion torchvision/transforms/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ def erase(img: Tensor, i: int, j: int, h: int, w: int, v: Tensor, inplace: bool
def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None) -> Tensor:
"""Performs Gaussian blurring on the image by given kernel.
If the image is torch Tensor, it is expected
to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions.
to have [..., H, W] shape, where ... means at most one leading dimension.
Args:
img (PIL Image or Tensor): Image to be blurred
Expand Down
2 changes: 1 addition & 1 deletion torchvision/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ def __repr__(self) -> str:
class GaussianBlur(torch.nn.Module):
"""Blurs image with randomly chosen Gaussian blur.
If the image is torch Tensor, it is expected
to have [..., C, H, W] shape, where ... means an arbitrary number of leading dimensions.
to have [..., C, H, W] shape, where ... means at most one leading dimension.
Args:
kernel_size (int or sequence): Size of the Gaussian kernel.
Expand Down
2 changes: 1 addition & 1 deletion torchvision/transforms/v2/_type_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _transform(


class ToPureTensor(Transform):
"""[BETA] Convert all tv_tensors to pure tensors, removing associated metadata (if any).
"""[BETA] Convert all TVTensors to pure tensors, removing associated metadata (if any).
.. v2betastatus:: ToPureTensor transform
Expand Down

0 comments on commit f172a66

Please sign in to comment.