-
Notifications
You must be signed in to change notification settings - Fork 12
Hello author, I currently have a question. #24
Copy link
Copy link
Open
Description
When the parameters of my camera settings are exactly the same, inside the train.py diffs = [] for i, cam1 in enumerate(camera_t): for j, cam2 in enumerate(camera_t): if i == j: continue else: diff = torch.sqrt(torch.sum((cam1 - cam2)**2)) diffs.append(diff) diffs = torch.stack(diffs), the code will report an error because diffs is 0.Can you change it like this?` if all(diff == 0 for diff in diffs):
default_diff = torch.tensor([1.0])
diffs = [default_diff]
diffs = torch.stack(diffs)
print("All differences are 0. Skipping stacking and related operations.")
continue
else:
diffs = torch.stack(diffs)`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels