-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
reduce unittest gpu memory #3448
Conversation
@@ -11,10 +11,10 @@ def test_int_tensor(self): | |||
|
|||
tensor = var.get_tensor() | |||
|
|||
tensor.set_dims([1000, 784]) | |||
tensor.set_dims([100, 84]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try three configurations -- [7, 0], [0, 7], [7,13] -- 7 and 13 are just small prime numbers. Prime numbers are reasonable becaue they are not power of 2 or any way defactorizable. 0 is a good boundary case.
@@ -18,7 +18,7 @@ class TestSoftmaxOp(unittest.TestCase): | |||
|
|||
def setUp(self): | |||
self.type = "softmax" | |||
self.inputs = {'X': np.random.random((32, 100)).astype("float32")} | |||
self.inputs = {'X': np.random.random((32, 22)).astype("float32")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us use small prime numbers.
@@ -24,7 +24,7 @@ def setUp(self): | |||
class CrossEntropyGradOpTest(GradientChecker): | |||
def test_softmax_grad(self): | |||
op = create_op("onehot_cross_entropy") | |||
batch_size = 100 | |||
batch_size = 32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test case with batch size = 0./
@@ -13,8 +13,8 @@ class TestAddOp(unittest.TestCase): | |||
def setUp(self): | |||
self.type = "add_two" | |||
self.inputs = { | |||
'X': numpy.random.random((102, 105)).astype("float32"), | |||
'Y': numpy.random.random((102, 105)).astype("float32") | |||
'X': numpy.random.random((12, 15)).astype("float32"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add cases like
- [7, 0]
- [0, 7]
- [0, 0]
- [7, 13]
7 and 13 are just small prime numbers.
感谢您给PaddlePaddle贡献代码。由于Paddle V1/V2版本已不再维护,相关代码也已从develop分支上删除,因此关闭您的PR,欢迎您向Paddle最新版-Fluid贡献代码。 |
fix #3437