Fixed minor spelling mistakes (#10489)
Co-authored-by: WybeKoper <WybeKoper@users.noreply.github.com>
This commit is contained in:
@@ -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.
|
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
|
start_position: start of the answer token index
|
||||||
end_position: end of the answer token index
|
end_position: end of the answer token index
|
||||||
encoding: optionally store the BatchEncoding with the fast-tokenizer alignement methods.
|
encoding: optionally store the BatchEncoding with the fast-tokenizer alignment methods.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class QuantAct(nn.Module):
|
|||||||
):
|
):
|
||||||
|
|
||||||
x_act = x if identity is None else identity + x
|
x_act = x if identity is None else identity + x
|
||||||
# collect runnng stats if traiing
|
# collect running stats if training
|
||||||
if self.training:
|
if self.training:
|
||||||
assert not self.percentile, "percentile mode is not currently supported for activation."
|
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."
|
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):
|
class FixedPointMul(Function):
|
||||||
"""
|
"""
|
||||||
Function to perform fixed-point arthmetic that can match integer arthmetic on hardware.
|
Function to perform fixed-point arithmetic that can match integer arithmetic on hardware.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
pre_act (:obj:`torch.Tensor`):
|
pre_act (:obj:`torch.Tensor`):
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ else:
|
|||||||
if is_torch_tpu_available():
|
if is_torch_tpu_available():
|
||||||
import torch_xla.core.xla_model as xm
|
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 suppress an undesired warning emitted by pytorch versions 1.4.2-1.7.0
|
||||||
try:
|
try:
|
||||||
from torch.optim.lr_scheduler import SAVE_STATE_WARNING
|
from torch.optim.lr_scheduler import SAVE_STATE_WARNING
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user