Upload folder using huggingface_hub
Browse files- app.py +0 -2
- inference.py +2 -2
app.py
CHANGED
@@ -16,8 +16,6 @@ else: device = 'cpu'
|
|
16 |
print('DEVICE:', device)
|
17 |
if device == 'cuda': print('CUDA DEVICE:', torch.cuda.get_device_name())
|
18 |
|
19 |
-
torch.manual_seed(42)
|
20 |
-
|
21 |
model = VGG_19().to(device).eval()
|
22 |
for param in model.parameters():
|
23 |
param.requires_grad = False
|
|
|
16 |
print('DEVICE:', device)
|
17 |
if device == 'cuda': print('CUDA DEVICE:', torch.cuda.get_device_name())
|
18 |
|
|
|
|
|
19 |
model = VGG_19().to(device).eval()
|
20 |
for param in model.parameters():
|
21 |
param.requires_grad = False
|
inference.py
CHANGED
@@ -26,8 +26,8 @@ def inference(
|
|
26 |
content_image,
|
27 |
style_features,
|
28 |
lr,
|
29 |
-
iterations=
|
30 |
-
optim_caller=optim.
|
31 |
alpha=1,
|
32 |
beta=1
|
33 |
):
|
|
|
26 |
content_image,
|
27 |
style_features,
|
28 |
lr,
|
29 |
+
iterations=35,
|
30 |
+
optim_caller=optim.AdamW,
|
31 |
alpha=1,
|
32 |
beta=1
|
33 |
):
|