Spaces:
Sleeping
Sleeping
i fogor π
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def process_image(input_image, learning_rate, iterations, n_targets, seed):
|
|
29 |
|
30 |
torch.manual_seed(int(seed))
|
31 |
random_one_logits = torch.zeros(1000)
|
32 |
-
random_one_logits[torch.randperm(1000)[:n_targets]] = 1
|
33 |
random_one_logits = random_one_logits.to(pixel_values.device)
|
34 |
|
35 |
for iteration in range(int(iterations)):
|
|
|
29 |
|
30 |
torch.manual_seed(int(seed))
|
31 |
random_one_logits = torch.zeros(1000)
|
32 |
+
random_one_logits[torch.randperm(1000)[:int(n_targets)]] = 1
|
33 |
random_one_logits = random_one_logits.to(pixel_values.device)
|
34 |
|
35 |
for iteration in range(int(iterations)):
|