fix recent lint

Summary: lint clean again

Reviewed By: patricklabatut

Differential Revision: D20868775

fbshipit-source-id: ade4301c1012c5c6943186432465215701d635a9
This commit is contained in:
Jeremy Reizenstein
2020-04-06 06:38:50 -07:00
committed by Facebook GitHub Bot
parent 90dc7a0856
commit b87058c62a
6 changed files with 29 additions and 60 deletions

View File

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