So should the exponent be trained?
If so, you could define it as a parameter and try to optimize it.
However, you would have to take care of negative input values (root of then yields NaN) and probably using the log will be more stable:
e = nn.Parameter(torch.empty(1).uniform_(0, 1))

data = torch.linspace(1, 10, 9)
target = torch.log(data**2)

optimizer = torch.optim.SGD([e], lr=1e-3)
criterion = nn.L1Loss()

for epoch in range(1000):
    optimizer.zero_grad()
    out = e * torch.log(data)
    loss = criterion(out, target)
    loss.backward()
    optimizer.step()
    print('epoch {}, loss {}, e {}'.format(epoch, loss.item(), e.item()))