Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate test methods #3039

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions pymnn/test/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ def test_less(self):
self.assertEqualVar(expr.less(self.x, self.x), np.less(self.x_, self.x_))
def test_floordiv(self):
self.assertEqualVar(expr.floordiv(2.0, 1.2), np.floor_divide(2.0, 1.2))
def test_less(self):
self.assertEqualVar(expr.less(self.x, self.x), np.less(self.x_, self.x_))
def test_squared_difference(self):
self.assertEqualVar(expr.squared_difference(self.x, self.x), np.square(self.x_ - self.x_))
def test_equal(self):
Expand Down Expand Up @@ -243,7 +241,7 @@ def test_cast(self):
self.assertEqualVar(expr.cast(self.x, expr.int), self.x_.astype(np.int32))
def test_matmul(self):
self.assertEqualVar(expr.matmul(self.x, self.x), np.matmul(self.x_, self.x_))
def test_normalize(self):
def test_normalize_with_reference(self):
def _refNormalize(src, batch, channel, area, scale, eps):
dst = [0.0] * (batch * channel * area)
for b in range(0, batch):
Expand Down Expand Up @@ -413,7 +411,7 @@ def test_crop(self):
x = expr.convert(x, expr.NC4HW4)
size = expr.const([0.0, 0.0, 0.0, 0.0], [1, 1, 2, 2], expr.NCHW, expr.float)
self.assertEqual(expr.convert(expr.crop(x, size, 2, [1, 1]), expr.NCHW).read_as_tuple(), (6.0, 7.0, 10.0, 11.0))
def test_resize(self):
def test_resize_expr(self):
x = expr.const([-1.0, -2.0, 3.0, 4.0], [1, 2, 2, 1], expr.NHWC, expr.float)
x = expr.convert(x, expr.NC4HW4)
y = expr.resize(x, 2.0, 2.0)
Expand Down Expand Up @@ -901,7 +899,7 @@ def test_merge(self):
x = cv.merge(channels)
y = cv2.merge(channels_)
self.assertEqualVar(x, y)
def test_split(self):
def test_split_image_channels(self):
# dim = 1
a = mp.arange(12.)
a_ = np.arange(12.)
Expand Down
Loading