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
ModelZoo
ResNet50_tensorflow
Commits
9e3550e5
Commit
9e3550e5
authored
Apr 07, 2021
by
A. Unique TensorFlower
Browse files
Minor cleanup in `projects/mobilebert/distillation.py`.
PiperOrigin-RevId: 367244904
parent
417aa073
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
official/nlp/projects/mobilebert/distillation.py
official/nlp/projects/mobilebert/distillation.py
+0
-1
No files found.
official/nlp/projects/mobilebert/distillation.py
View file @
9e3550e5
...
...
@@ -378,7 +378,6 @@ class BertDistillationTask(policies.ProgressivePolicy, base_task.Task):
# Shape: [batch, max_predictions_per_seq, vocab_size]
lm_label
=
tf
.
one_hot
(
indices
=
lm_label
,
depth
=
vocab_size
,
on_value
=
1.0
,
off_value
=
0.0
,
axis
=-
1
,
dtype
=
tf
.
float32
)
lm_label_weights
=
labels
[
'masked_lm_weights'
]
gt_ratio
=
distill_config
.
distill_ground_truth_ratio
if
gt_ratio
!=
1.0
:
teacher_mlm_logits
=
outputs
[
'teacher_pretrainer_output'
][
'mlm_logits'
]
...
...
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