Spaces:
Runtime error
Runtime error
Update util.py
Browse files
util.py
CHANGED
|
@@ -27,7 +27,6 @@ import numpy as np
|
|
| 27 |
|
| 28 |
import torch
|
| 29 |
import torch.nn.functional as F
|
| 30 |
-
import torch.cuda.amp as amp
|
| 31 |
import torchvision.transforms as T
|
| 32 |
import torchvision.transforms.functional as TF
|
| 33 |
|
|
@@ -99,7 +98,6 @@ def filter_2d_by_kernel_2d(x: torch.Tensor, k: torch.Tensor) -> torch.Tensor:
|
|
| 99 |
return x
|
| 100 |
|
| 101 |
|
| 102 |
-
@amp.autocast(False)
|
| 103 |
def filter_by_kernel(
|
| 104 |
x: torch.Tensor,
|
| 105 |
k: torch.Tensor,
|
|
|
|
| 27 |
|
| 28 |
import torch
|
| 29 |
import torch.nn.functional as F
|
|
|
|
| 30 |
import torchvision.transforms as T
|
| 31 |
import torchvision.transforms.functional as TF
|
| 32 |
|
|
|
|
| 98 |
return x
|
| 99 |
|
| 100 |
|
|
|
|
| 101 |
def filter_by_kernel(
|
| 102 |
x: torch.Tensor,
|
| 103 |
k: torch.Tensor,
|