Skip to content

Commit cde06bc

Browse files
committed
[DOC] Fix up typos
1 parent 43f3efc commit cde06bc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

torchensemble/adversarial_training.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def _parallel_fit_per_epoch(train_loader,
152152
def _get_fgsm_samples(sample, epsilon, sample_grad):
153153
"""
154154
Private functions used to generate adversarial samples with fast gradient
155-
sign method (FGSM)."""
155+
sign method (FGSM).
156+
"""
156157

157158
# Check the input range of `sample`
158159
min_value, max_value = torch.min(sample), torch.max(sample)
@@ -165,6 +166,7 @@ def _get_fgsm_samples(sample, epsilon, sample_grad):
165166
sign_sample_grad = sample_grad.sign()
166167
perturbed_sample = sample + epsilon * sign_sample_grad
167168
perturbed_sample = torch.clamp(perturbed_sample, 0, 1)
169+
168170
return perturbed_sample
169171

170172

torchensemble/bagging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
In bagging-based ensemble, each base estimator is trained independently.
33
In addition, sampling with replacement is conducted on the training data
4-
batch to encourge the diversity between different base estimators in the
4+
batch to encourage the diversity between different base estimators in the
55
ensemble.
66
"""
77

0 commit comments

Comments
 (0)