Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
5dc303e2
Unverified
Commit
5dc303e2
authored
Mar 03, 2021
by
WybeKoper
Committed by
GitHub
Mar 03, 2021
Browse files
Fixed minor spelling mistakes (#10489)
Co-authored-by:
WybeKoper
<
WybeKoper@users.noreply.github.com
>
parent
1750e629
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
src/transformers/data/processors/squad.py
src/transformers/data/processors/squad.py
+1
-1
src/transformers/models/ibert/quant_modules.py
src/transformers/models/ibert/quant_modules.py
+2
-2
src/transformers/trainer_pt_utils.py
src/transformers/trainer_pt_utils.py
+1
-1
No files found.
src/transformers/data/processors/squad.py
View file @
5dc303e2
...
...
@@ -779,7 +779,7 @@ class SquadFeatures:
token_to_orig_map: mapping between the tokens and the original text, needed in order to identify the answer.
start_position: start of the answer token index
end_position: end of the answer token index
encoding: optionally store the BatchEncoding with the fast-tokenizer align
e
ment methods.
encoding: optionally store the BatchEncoding with the fast-tokenizer alignment methods.
"""
def
__init__
(
...
...
src/transformers/models/ibert/quant_modules.py
View file @
5dc303e2
...
...
@@ -169,7 +169,7 @@ class QuantAct(nn.Module):
):
x_act
=
x
if
identity
is
None
else
identity
+
x
# collect runnng stats if traiing
# collect runn
i
ng stats if trai
n
ing
if
self
.
training
:
assert
not
self
.
percentile
,
"percentile mode is not currently supported for activation."
assert
not
self
.
per_channel
,
"per-channel mode is not currently supported for activation."
...
...
@@ -746,7 +746,7 @@ def batch_frexp(inputs, max_bit=31):
class
FixedPointMul
(
Function
):
"""
Function to perform fixed-point arthmetic that can match integer arthmetic on hardware.
Function to perform fixed-point ar
i
thmetic that can match integer ar
i
thmetic on hardware.
Args:
pre_act (:obj:`torch.Tensor`):
...
...
src/transformers/trainer_pt_utils.py
View file @
5dc303e2
...
...
@@ -44,7 +44,7 @@ else:
if
is_torch_tpu_available
():
import
torch_xla.core.xla_model
as
xm
# this is used to supress an undesired warning emitted by pytorch versions 1.4.2-1.7.0
# this is used to sup
p
ress an undesired warning emitted by pytorch versions 1.4.2-1.7.0
try
:
from
torch.optim.lr_scheduler
import
SAVE_STATE_WARNING
except
ImportError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment