mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 23:30:35 +08:00
fix recent lint
Summary: lint clean again Reviewed By: patricklabatut Differential Revision: D20868775 fbshipit-source-id: ade4301c1012c5c6943186432465215701d635a9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
90dc7a0856
commit
b87058c62a
@@ -3,11 +3,10 @@ import unittest
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from common_testing import TestCaseMixin
|
||||
|
||||
from pytorch3d.ops import utils as oputil
|
||||
|
||||
|
||||
class TestOpsUtils(TestCaseMixin, unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
super().setUp()
|
||||
@@ -62,8 +61,7 @@ class TestOpsUtils(TestCaseMixin, unittest.TestCase):
|
||||
# test dim
|
||||
weight = torch.rand(x.shape[0], n_points, device=device)
|
||||
weight_np = np.tile(
|
||||
weight[:, :, None].cpu().data.numpy(),
|
||||
(1, 1, x_np.shape[-1]),
|
||||
weight[:, :, None].cpu().data.numpy(), (1, 1, x_np.shape[-1])
|
||||
)
|
||||
mean = oputil.wmean(x, dim=0, weight=weight, keepdim=False)
|
||||
mean_gt = np.average(x_np, axis=0, weights=weight_np)
|
||||
|
||||
Reference in New Issue
Block a user