(
labels,
road_ids = [10, 11],
weights = [0.2, 0.8],
)
| 340 | return weight |
| 341 | |
| 342 | def build_semantic_weights( |
| 343 | labels, |
| 344 | road_ids = [10, 11], |
| 345 | weights = [0.2, 0.8], |
| 346 | ): |
| 347 | mask = torch.isin(labels, torch.tensor(road_ids, device=labels.device)) |
| 348 | weights = torch.where(mask, weights[1], weights[0]) |
| 349 | |
| 350 | return weights |
| 351 | |
| 352 | def remove_empty_dirs( |
| 353 | root: str | Path, *, |
nothing calls this directly
no outgoing calls
no test coverage detected