Skip to content

Commit

Permalink
Merge branch 'main' into please_dont_modify_this_branch_unless_you_ar…
Browse files Browse the repository at this point in the history
…e_just_merging_with_main
  • Loading branch information
NicolasHug authored Sep 25, 2023
2 parents 1691693 + 622bb26 commit daed04e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 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_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

0 comments on commit daed04e

Please sign in to comment.