To receive notifications about scheduled maintenance, please subscribe to the mailing-list You can subscribe to the mailing-list at

Commit fe5ce3df authored by Lukas's avatar Lukas
Browse files

debug output for new angle loss

parent e257acf7
......@@ -6,6 +6,7 @@ from torch_models.torch_utils.utils import get_gpu_memory
from torch_models.torch_utils.utils import timing_decorator
from memory_profiler import profile
#import torch.profiler
from torch_models.torch_utils.custom_losses import angle_loss
......@@ -27,6 +28,14 @@ def train_loop(dataloader, model, loss_fn, optimizer):
# Compute prediction and loss
pred = model(X)
loss = loss_fn(pred, y)
print(f"y vs. pred")
cat =, pred), dim=1)
print(f"Loss ")
loss_tensor = torch.square(torch.abs(torch.atan2(torch.sin(y - pred), torch.cos(y - pred))))
# Backpropagation and optimization
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment