import kornia.augmentation as K
import torch; import torch.nn as nn

t = lambda x: torch.tensor(x); p = lambda x: nn.Parameter(t(x))
torch.manual_seed(42);

images = torch.tensor(img, requires_grad=True)

jitter = K.ColorJitter(
    p([0.8, 0.8]), p([0.7, 0.7]), p([0.6, 0.6]), t([0.1, 0.1]))

out = jitter(images)

loss = nn.MSELoss()(out, images)
optimizer_img = torch.optim.SGD([images], lr=1e+5)
optimizer_param = torch.optim.SGD(jitter.parameters(), lr=0.1)

loss.backward()
optimizer_img.step()
optimizer_param.step()

ef2004a604c2b97fd12b18ab9daf96b87d3f4e77
<mask token>

<mask token>
torch.manual_seed(42)
<mask token>
loss.backward()
optimizer_img.step()
optimizer_param.step()

<mask token>
t = lambda x: torch.tensor(x)
p = lambda x: nn.Parameter(t(x))
torch.manual_seed(42)
images = torch.tensor(img, requires_grad=True)
jitter = K.ColorJitter(p([0.8, 0.8]), p([0.7, 0.7]), p([0.6, 0.6]), t([0.1,
    0.1]))
out = jitter(images)
loss = nn.MSELoss()(out, images)
optimizer_img = torch.optim.SGD([images], lr=100000.0)
optimizer_param = torch.optim.SGD(jitter.parameters(), lr=0.1)
loss.backward()
optimizer_img.step()
optimizer_param.step()

import kornia.augmentation as K
import torch
import torch.nn as nn
t = lambda x: torch.tensor(x)
p = lambda x: nn.Parameter(t(x))
torch.manual_seed(42)
images = torch.tensor(img, requires_grad=True)
jitter = K.ColorJitter(p([0.8, 0.8]), p([0.7, 0.7]), p([0.6, 0.6]), t([0.1,
    0.1]))
out = jitter(images)
loss = nn.MSELoss()(out, images)
optimizer_img = torch.optim.SGD([images], lr=100000.0)
optimizer_param = torch.optim.SGD(jitter.parameters(), lr=0.1)
loss.backward()
optimizer_img.step()
optimizer_param.step()

import kornia.augmentation as K
import torch; import torch.nn as nn

t = lambda x: torch.tensor(x); p = lambda x: nn.Parameter(t(x))
torch.manual_seed(42);

images = torch.tensor(img, requires_grad=True)

jitter = K.ColorJitter(
    p([0.8, 0.8]), p([0.7, 0.7]), p([0.6, 0.6]), t([0.1, 0.1]))

out = jitter(images)

loss = nn.MSELoss()(out, images)
optimizer_img = torch.optim.SGD([images], lr=1e+5)
optimizer_param = torch.optim.SGD(jitter.parameters(), lr=0.1)

loss.backward()
optimizer_img.step()
optimizer_param.step()
