Unverified Commit 42105795 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix doc examples: ... takes no keyword arguments (#14701)



* Fix doc examples: ... takes no keyword arguments

* fix copies
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
parent 355dc0ce
...@@ -94,7 +94,10 @@ class XSoftmax(torch.autograd.Function): ...@@ -94,7 +94,10 @@ class XSoftmax(torch.autograd.Function):
>>> # Create a mask >>> # Create a mask
>>> mask = (x>0).int() >>> mask = (x>0).int()
>>> y = XSoftmax.apply(x, mask, dim=-1) >>> # Specify the dimension to apply softmax
>>> dim = -1
>>> y = XSoftmax.apply(x, mask, dim)
```""" ```"""
@staticmethod @staticmethod
......
...@@ -95,7 +95,10 @@ class XSoftmax(torch.autograd.Function): ...@@ -95,7 +95,10 @@ class XSoftmax(torch.autograd.Function):
>>> # Create a mask >>> # Create a mask
>>> mask = (x>0).int() >>> mask = (x>0).int()
>>> y = XSoftmax.apply(x, mask, dim=-1) >>> # Specify the dimension to apply softmax
>>> dim = -1
>>> y = XSoftmax.apply(x, mask, dim)
```""" ```"""
@staticmethod @staticmethod
......
...@@ -484,7 +484,10 @@ class XSoftmax(torch.autograd.Function): ...@@ -484,7 +484,10 @@ class XSoftmax(torch.autograd.Function):
>>> # Create a mask >>> # Create a mask
>>> mask = (x>0).int() >>> mask = (x>0).int()
>>> y = XSoftmax.apply(x, mask, dim=-1) >>> # Specify the dimension to apply softmax
>>> dim = -1
>>> y = XSoftmax.apply(x, mask, dim)
```""" ```"""
@staticmethod @staticmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment