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
89fd2bb1
Commit
89fd2bb1
authored
Oct 26, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Oct 26, 2020
Browse files
Py3 cleanup for nlp/
PiperOrigin-RevId: 339071563
parent
4085c19a
Changes
65
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1 addition
and
85 deletions
+1
-85
official/nlp/bert/tf1_checkpoint_converter_lib.py
official/nlp/bert/tf1_checkpoint_converter_lib.py
+0
-3
official/nlp/bert/tf2_encoder_checkpoint_converter.py
official/nlp/bert/tf2_encoder_checkpoint_converter.py
+0
-3
official/nlp/bert/tokenization.py
official/nlp/bert/tokenization.py
+0
-4
official/nlp/bert/tokenization_test.py
official/nlp/bert/tokenization_test.py
+0
-3
official/nlp/data/classifier_data_lib.py
official/nlp/data/classifier_data_lib.py
+0
-4
official/nlp/data/create_finetuning_data.py
official/nlp/data/create_finetuning_data.py
+0
-4
official/nlp/data/create_pretraining_data.py
official/nlp/data/create_pretraining_data.py
+0
-3
official/nlp/data/squad_lib.py
official/nlp/data/squad_lib.py
+0
-5
official/nlp/data/squad_lib_sp.py
official/nlp/data/squad_lib_sp.py
+0
-4
official/nlp/modeling/networks/classification.py
official/nlp/modeling/networks/classification.py
+0
-4
official/nlp/modeling/networks/encoder_scaffold.py
official/nlp/modeling/networks/encoder_scaffold.py
+0
-5
official/nlp/modeling/networks/span_labeling.py
official/nlp/modeling/networks/span_labeling.py
+0
-4
official/nlp/nhnet/decoder.py
official/nlp/nhnet/decoder.py
+0
-5
official/nlp/nhnet/decoder_test.py
official/nlp/nhnet/decoder_test.py
+0
-4
official/nlp/nhnet/input_pipeline.py
official/nlp/nhnet/input_pipeline.py
+1
-5
official/nlp/nhnet/models.py
official/nlp/nhnet/models.py
+0
-6
official/nlp/nhnet/optimizer.py
official/nlp/nhnet/optimizer.py
+0
-5
official/nlp/nhnet/trainer.py
official/nlp/nhnet/trainer.py
+0
-4
official/nlp/nhnet/utils.py
official/nlp/nhnet/utils.py
+0
-5
official/nlp/transformer/attention_layer.py
official/nlp/transformer/attention_layer.py
+0
-5
No files found.
official/nlp/bert/tf1_checkpoint_converter_lib.py
View file @
89fd2bb1
...
...
@@ -13,9 +13,6 @@
# limitations under the License.
# ==============================================================================
r
"""Convert checkpoints created by Estimator (tf1) to be Keras compatible."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
numpy
as
np
import
tensorflow.compat.v1
as
tf
# TF 1.x
...
...
official/nlp/bert/tf2_encoder_checkpoint_converter.py
View file @
89fd2bb1
...
...
@@ -18,9 +18,6 @@ The conversion will yield an object-oriented checkpoint that can be used
to restore a BertEncoder or BertPretrainerV2 object (see the `converted_model`
FLAG below).
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
...
...
official/nlp/bert/tokenization.py
View file @
89fd2bb1
...
...
@@ -19,10 +19,6 @@ The file is forked from:
https://github.com/google-research/bert/blob/master/tokenization.py.
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
collections
import
re
import
unicodedata
...
...
official/nlp/bert/tokenization_test.py
View file @
89fd2bb1
...
...
@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
import
tempfile
...
...
official/nlp/data/classifier_data_lib.py
View file @
89fd2bb1
...
...
@@ -14,10 +14,6 @@
# ==============================================================================
"""BERT library to process data for classification task."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
collections
import
csv
import
importlib
...
...
official/nlp/data/create_finetuning_data.py
View file @
89fd2bb1
...
...
@@ -14,10 +14,6 @@
# ==============================================================================
"""BERT finetuning task dataset generator."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
functools
import
json
import
os
...
...
official/nlp/data/create_pretraining_data.py
View file @
89fd2bb1
...
...
@@ -13,9 +13,6 @@
# limitations under the License.
# ==============================================================================
"""Create masked LM/next sentence masked_lm TF examples for BERT."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
collections
import
itertools
...
...
official/nlp/data/squad_lib.py
View file @
89fd2bb1
...
...
@@ -13,12 +13,7 @@
# limitations under the License.
# ==============================================================================
"""Library to process data for SQuAD 1.1 and SQuAD 2.0."""
# pylint: disable=g-bad-import-order
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
collections
import
copy
import
json
...
...
official/nlp/data/squad_lib_sp.py
View file @
89fd2bb1
...
...
@@ -18,10 +18,6 @@ The file is forked from:
https://github.com/google-research/ALBERT/blob/master/run_squad_sp.py
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
collections
import
copy
import
json
...
...
official/nlp/modeling/networks/classification.py
View file @
89fd2bb1
...
...
@@ -14,10 +14,6 @@
# ==============================================================================
"""Classification and regression network."""
# pylint: disable=g-classes-have-attributes
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
collections
import
tensorflow
as
tf
...
...
official/nlp/modeling/networks/encoder_scaffold.py
View file @
89fd2bb1
...
...
@@ -15,11 +15,6 @@
# ==============================================================================
"""Transformer-based text encoder network."""
# pylint: disable=g-classes-have-attributes
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
inspect
from
absl
import
logging
...
...
official/nlp/modeling/networks/span_labeling.py
View file @
89fd2bb1
...
...
@@ -14,10 +14,6 @@
# ==============================================================================
"""Span labeling network."""
# pylint: disable=g-classes-have-attributes
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
collections
import
tensorflow
as
tf
...
...
official/nlp/nhnet/decoder.py
View file @
89fd2bb1
...
...
@@ -14,11 +14,6 @@
# ==============================================================================
"""Transformer decoder that mimics a BERT encoder, to load BERT checkpoints."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
tensorflow
as
tf
from
official.modeling
import
tf_utils
from
official.nlp.modeling
import
layers
...
...
official/nlp/nhnet/decoder_test.py
View file @
89fd2bb1
...
...
@@ -14,10 +14,6 @@
# ==============================================================================
"""Tests for nlp.nhnet.decoder."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
numpy
as
np
import
tensorflow
as
tf
from
official.nlp.modeling
import
layers
...
...
official/nlp/nhnet/input_pipeline.py
View file @
89fd2bb1
...
...
@@ -14,11 +14,7 @@
# ==============================================================================
"""Input pipelines."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow.compat.v2
as
tf
import
tensorflow
as
tf
def
decode_record
(
record
,
name_to_features
):
...
...
official/nlp/nhnet/models.py
View file @
89fd2bb1
...
...
@@ -13,12 +13,6 @@
# limitations under the License.
# ==============================================================================
"""tf.keras Models for NHNet."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
absl
import
logging
import
gin
import
tensorflow
as
tf
...
...
official/nlp/nhnet/optimizer.py
View file @
89fd2bb1
...
...
@@ -14,11 +14,6 @@
# ==============================================================================
"""Optimizer and learning rate scheduler."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
tensorflow
as
tf
from
official.modeling.hyperparams
import
params_dict
...
...
official/nlp/nhnet/trainer.py
View file @
89fd2bb1
...
...
@@ -15,10 +15,6 @@
# ==============================================================================
"""Run NHNet model training and eval."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
# Import libraries
...
...
official/nlp/nhnet/utils.py
View file @
89fd2bb1
...
...
@@ -13,11 +13,6 @@
# limitations under the License.
# ==============================================================================
"""Utility helpers for Bert2Bert."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
absl
import
logging
import
tensorflow
as
tf
from
typing
import
Optional
,
Text
...
...
official/nlp/transformer/attention_layer.py
View file @
89fd2bb1
...
...
@@ -13,11 +13,6 @@
# limitations under the License.
# ==============================================================================
"""Implementation of multiheaded attention and self-attention layers."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
math
import
tensorflow
as
tf
...
...
Prev
1
2
3
4
Next
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