MCPcopy Create free account
hub / github.com/DIVE128/DMVSNet / winner_take_all

Function winner_take_all

networks/module.py:463–471  ·  view source on GitHub ↗

:param prob_volume: (b, d, h, w) :param depth_values: (b, d, h, w) :return: (b, h, w)

(prob_volume, depth_values)

Source from the content-addressed store, hash-verified

461
462
463def winner_take_all(prob_volume, depth_values):
464 """
465 :param prob_volume: (b, d, h, w)
466 :param depth_values: (b, d, h, w)
467 :return: (b, h, w)
468 """
469 _, idx = torch.max(prob_volume, dim=1, keepdim=True)
470 depth = torch.gather(depth_values, 1, idx).squeeze(1)
471 return depth
472
473
474

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected