mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-22 14:15:01 +08:00
Fix example of torch.clamp (#7131)
This commit is contained in:
committed by
Adam Paszke
parent
ba046331e8
commit
dccfdf317b
@ -762,9 +762,9 @@ Example::
|
||||
|
||||
>>> a = torch.randn(4)
|
||||
>>> a
|
||||
tensor([ 0.0753, -0.4702, -0.4599, 0.1899])
|
||||
tensor([ 0.7753, -0.4702, -0.4599, 1.1899])
|
||||
>>> torch.clamp(a, max=0.5)
|
||||
tensor([ 0.0753, -0.4702, -0.4599, 0.1899])
|
||||
tensor([ 0.5000, -0.4702, -0.4599, 0.5000])
|
||||
""")
|
||||
|
||||
add_docstr(torch.cos,
|
||||
|
Reference in New Issue
Block a user