Skip to content

Commit 33ba331

Browse files
committed
Fix function parameter order and update test case
1 parent 1d4a2a6 commit 33ba331

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

python/paddle/tensor/linalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@ def bmm(x, y, name=None):
21832183

21842184

21852185
def histogram(
2186-
input, weight=None, density: bool = False, bins=100, min=0, max=0, name=None
2186+
input, density: bool = False, bins=100, min=0, max=0, weight=None, name=None
21872187
):
21882188
"""
21892189
Computes the histogram of a tensor. The elements are sorted into equal width bins between min and max.

test/legacy_test/test_imperative_layers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def test_layer_str(self):
8585
self.assertEqual(str(module), 'Tanhshrink()')
8686

8787
module = nn.ThresholdedReLU()
88-
self.assertEqual(str(module), 'ThresholdedReLU(threshold=1.0)')
88+
self.assertEqual(
89+
str(module), 'ThresholdedReLU(threshold=1.0, value=0.0)'
90+
)
8991

9092
module = nn.LogSigmoid()
9193
self.assertEqual(str(module), 'LogSigmoid()')

0 commit comments

Comments
 (0)