Fix??
This commit is contained in:
parent
2475d7c8dd
commit
16ba45546b
2 changed files with 120 additions and 506 deletions
|
|
@ -21,7 +21,7 @@ def random_hparam_search(
|
|||
timeout_hours: int,
|
||||
device: torch.device,
|
||||
) -> None:
|
||||
for _ in range(1):
|
||||
for _ in count():
|
||||
current_hyperparameters = {
|
||||
k: v.rvs() if hasattr(v, "rvs") else choice(v)
|
||||
for k, v in choice(hyperparameters).items()
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def train(
|
|||
optimizer.zero_grad()
|
||||
predicted_original = model(edited_histogram.to(device))
|
||||
loss = loss_function(
|
||||
torch.log(torch.clamp(predicted_original, EPSILON, 1)),
|
||||
torch.log(predicted_original + EPSILON),
|
||||
original_histogram.to(device),
|
||||
)
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ def train(
|
|||
):
|
||||
predicted_original = model(edited_histogram.to(device))
|
||||
epoch_test_loss += loss_function(
|
||||
torch.log(torch.clamp(predicted_original, EPSILON, 1)),
|
||||
torch.log(predicted_original + EPSILON),
|
||||
original_histogram.to(device),
|
||||
).item()
|
||||
writer.add_hparams(
|
||||
|
|
|
|||
Loading…
Reference in a new issue