assignment-a1: fix
This commit is contained in:
@@ -2,8 +2,7 @@ import torch
|
|||||||
|
|
||||||
|
|
||||||
def avg_color(img: torch.Tensor):
|
def avg_color(img: torch.Tensor):
|
||||||
result = img.mean(dim=(1, 2)).tolist()
|
return img.mean(dim=(1, 2)).tolist()
|
||||||
return tuple(result)
|
|
||||||
|
|
||||||
|
|
||||||
def mask(foreground: torch.Tensor, background: torch.Tensor, mask_tensor: torch.Tensor, threshold: float):
|
def mask(foreground: torch.Tensor, background: torch.Tensor, mask_tensor: torch.Tensor, threshold: float):
|
||||||
|
|||||||
Reference in New Issue
Block a user