Skip to content

Commit

Permalink
Fix function parameter order and update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
AndPuQing committed Mar 30, 2024
1 parent 1d4a2a6 commit 33ba331
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/paddle/tensor/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ def bmm(x, y, name=None):


def histogram(
input, weight=None, density: bool = False, bins=100, min=0, max=0, name=None
input, density: bool = False, bins=100, min=0, max=0, weight=None, name=None
):
"""
Computes the histogram of a tensor. The elements are sorted into equal width bins between min and max.
Expand Down
4 changes: 3 additions & 1 deletion test/legacy_test/test_imperative_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def test_layer_str(self):
self.assertEqual(str(module), 'Tanhshrink()')

module = nn.ThresholdedReLU()
self.assertEqual(str(module), 'ThresholdedReLU(threshold=1.0)')
self.assertEqual(
str(module), 'ThresholdedReLU(threshold=1.0, value=0.0)'
)

module = nn.LogSigmoid()
self.assertEqual(str(module), 'LogSigmoid()')
Expand Down

0 comments on commit 33ba331

Please sign in to comment.