Spaces:
Sleeping
Sleeping
add tv_loss to method signature
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def total_variation_loss(img):
|
|
21 |
pixel_dif2 = img[:, :, :, 1:] - img[:, :, :, :-1]
|
22 |
return (torch.sum(torch.abs(pixel_dif1)) + torch.sum(torch.abs(pixel_dif2)))
|
23 |
|
24 |
-
def process_image(input_image, learning_rate, iterations, n_targets, seed):
|
25 |
if input_image is None:
|
26 |
return None
|
27 |
|
|
|
21 |
pixel_dif2 = img[:, :, :, 1:] - img[:, :, :, :-1]
|
22 |
return (torch.sum(torch.abs(pixel_dif1)) + torch.sum(torch.abs(pixel_dif2)))
|
23 |
|
24 |
+
def process_image(input_image, learning_rate, tv_loss, iterations, n_targets, seed):
|
25 |
if input_image is None:
|
26 |
return None
|
27 |
|