Skip to content

Hello author, I currently have a question. #24

@ruiqiyan

Description

@ruiqiyan

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)`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions