↓ 1 callersFunctionconvert_to_one_hot 将权重矩阵转换为 one-hot 形式。对于每个像素,选择最大权重对应的索引位置为 1,其他位置为 0。 :param weights: 形状为 [B, 4, H, W] 的权重矩阵 :return: 转换后的 one-hot 矩阵,形状为 [B, 4, H, W]
models/multiplane_sync_legacy.py:41
↓ 1 callersFunctionconvert_to_one_hot 将权重矩阵转换为 one-hot 形式。对于每个像素,选择最大权重对应的索引位置为 1,其他位置为 0。 :param weights: 形状为 [B, 4, H, W] 的权重矩阵 :return: 转换后的 one-hot 矩阵,形状为 [B, 4, H, W]
models/multiplane_sync/sync_conv2d.py:34
↓ 1 callersFunctionconvert_to_two_hot 将输入的权重矩阵中每个位置上最小的两个值置0,然后重新归一化。 :param weights: 输入的权重矩阵,形状为 [B, 4, H, W] :return: 处理后的权重矩阵,形状为 [B, 4, H, W]
models/multiplane_sync/sync_conv2d.py:59
↓ 1 callersFunctioncreate_equi_grid(
h_out: int,
w_out: int,
w_face: int,
batch: int,
dtype: torch.dtype = torch.float32,
external/equilib/cube2equi/torch.py:172
↓ 1 callersFunctioncreate_equi_grid(
h_out: int,
w_out: int,
w_face: int,
batch: int,
dtype: np.dtype = np.dtype(np.float32),
external/equilib/cube2equi/numpy.py:150
↓ 1 callersMethoddenormalize Args: normalized_depth: [B, ...], torch.FloatTensor, [-1.0, 1.0] min_value: [B,], torch.FloatTensor, [0.0, +inf]
utils/depth.py:638
↓ 1 callersFunctionget_bounding_fov(
equi: ArrayLike,
rots: Rot,
height: int,
width: int,
fov_x: float,
skew: float = 0.0
external/equilib/equi2pers/base.py:168
↓ 1 callersMethodprepare_cube_latents(
self, cube_rgbs, cube_depths, cube_masks,
dtype, device, normalize_scale, is_training=False,
models/dreamcube.py:87
↓ 1 callersFunctionrotate_patches 对 [B, C, K, K, H, W] 形状的 patches 进行 2D 旋转 :param patches: Tensor, shape [B, C, K, K, H, W] :param theta: Tensor, shape [H, W], 角度(弧度制)
models/multiplane_sync_legacy.py:130
↓ 1 callersFunctionrotate_patches 对 [B, C, K, K, H, W] 形状的 patches 进行 2D 旋转 :param patches: Tensor, shape [B, C, K, K, H, W] :param theta: Tensor, shape [H, W], 角度(弧度制)
models/multiplane_sync/sync_conv2d.py:153