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
0 additions
and
77 deletions
+0
-77
official/nlp/transformer/compute_bleu.py
official/nlp/transformer/compute_bleu.py
+0
-4
official/nlp/transformer/data_download.py
official/nlp/transformer/data_download.py
+0
-4
official/nlp/transformer/data_pipeline.py
official/nlp/transformer/data_pipeline.py
+0
-4
official/nlp/transformer/embedding_layer.py
official/nlp/transformer/embedding_layer.py
+0
-4
official/nlp/transformer/ffn_layer.py
official/nlp/transformer/ffn_layer.py
+0
-4
official/nlp/transformer/metrics.py
official/nlp/transformer/metrics.py
+0
-3
official/nlp/transformer/misc.py
official/nlp/transformer/misc.py
+0
-4
official/nlp/transformer/model_utils.py
official/nlp/transformer/model_utils.py
+0
-4
official/nlp/transformer/model_utils_test.py
official/nlp/transformer/model_utils_test.py
+0
-4
official/nlp/transformer/optimizer.py
official/nlp/transformer/optimizer.py
+0
-4
official/nlp/transformer/transformer.py
official/nlp/transformer/transformer.py
+0
-3
official/nlp/transformer/transformer_layers_test.py
official/nlp/transformer/transformer_layers_test.py
+0
-4
official/nlp/transformer/transformer_main.py
official/nlp/transformer/transformer_main.py
+0
-3
official/nlp/transformer/transformer_main_test.py
official/nlp/transformer/transformer_main_test.py
+0
-4
official/nlp/transformer/transformer_test.py
official/nlp/transformer/transformer_test.py
+0
-4
official/nlp/transformer/translate.py
official/nlp/transformer/translate.py
+0
-4
official/nlp/xlnet/common_flags.py
official/nlp/xlnet/common_flags.py
+0
-4
official/nlp/xlnet/data_utils.py
official/nlp/xlnet/data_utils.py
+0
-5
official/nlp/xlnet/optimization.py
official/nlp/xlnet/optimization.py
+0
-4
official/nlp/xlnet/preprocess_classification_data.py
official/nlp/xlnet/preprocess_classification_data.py
+0
-3
No files found.
official/nlp/transformer/compute_bleu.py
View file @
89fd2bb1
...
@@ -18,10 +18,6 @@ Source:
...
@@ -18,10 +18,6 @@ Source:
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/bleu_hook.py
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/bleu_hook.py
"""
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
re
import
re
import
sys
import
sys
import
unicodedata
import
unicodedata
...
...
official/nlp/transformer/data_download.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Download and preprocess WMT17 ende training and evaluation datasets."""
"""Download and preprocess WMT17 ende training and evaluation datasets."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
import
os
import
random
import
random
import
tarfile
import
tarfile
...
...
official/nlp/transformer/data_pipeline.py
View file @
89fd2bb1
...
@@ -47,10 +47,6 @@ Two things to note in the pipeline:
...
@@ -47,10 +47,6 @@ Two things to note in the pipeline:
in the order of the examples.
in the order of the examples.
"""
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
import
os
from
absl
import
logging
from
absl
import
logging
...
...
official/nlp/transformer/embedding_layer.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Implementation of embedding layer with shared weights."""
"""Implementation of embedding layer with shared weights."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
...
...
official/nlp/transformer/ffn_layer.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Implementation of fully connected network."""
"""Implementation of fully connected network."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
...
...
official/nlp/transformer/metrics.py
View file @
89fd2bb1
...
@@ -22,9 +22,6 @@ Metrics:
...
@@ -22,9 +22,6 @@ Metrics:
- ROUGE score. Source:
- ROUGE score. Source:
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/rouge.py
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/rouge.py
"""
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
functools
import
functools
...
...
official/nlp/transformer/misc.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Misc for Transformer."""
"""Misc for Transformer."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
# pylint: disable=g-bad-import-order
# pylint: disable=g-bad-import-order
from
absl
import
flags
from
absl
import
flags
...
...
official/nlp/transformer/model_utils.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Transformer model helper methods."""
"""Transformer model helper methods."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
math
import
math
import
numpy
as
np
import
numpy
as
np
...
...
official/nlp/transformer/model_utils_test.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Test Transformer model helper methods."""
"""Test Transformer model helper methods."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.nlp.transformer
import
model_utils
from
official.nlp.transformer
import
model_utils
...
...
official/nlp/transformer/optimizer.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Optimizer from addons and learning rate scheduler."""
"""Optimizer from addons and learning rate scheduler."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
...
...
official/nlp/transformer/transformer.py
View file @
89fd2bb1
...
@@ -17,9 +17,6 @@
...
@@ -17,9 +17,6 @@
Model paper: https://arxiv.org/pdf/1706.03762.pdf
Model paper: https://arxiv.org/pdf/1706.03762.pdf
Transformer model code source: https://github.com/tensorflow/tensor2tensor
Transformer model code source: https://github.com/tensorflow/tensor2tensor
"""
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.nlp.modeling.layers
import
position_embedding
from
official.nlp.modeling.layers
import
position_embedding
...
...
official/nlp/transformer/transformer_layers_test.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Tests for layers in Transformer."""
"""Tests for layers in Transformer."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.nlp.transformer
import
attention_layer
from
official.nlp.transformer
import
attention_layer
...
...
official/nlp/transformer/transformer_main.py
View file @
89fd2bb1
...
@@ -17,9 +17,6 @@
...
@@ -17,9 +17,6 @@
See README for description of setting the training schedule and evaluating the
See README for description of setting the training schedule and evaluating the
BLEU score.
BLEU score.
"""
"""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
import
os
import
tempfile
import
tempfile
...
...
official/nlp/transformer/transformer_main_test.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Test Transformer model."""
"""Test Transformer model."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
import
os
import
re
import
re
import
sys
import
sys
...
...
official/nlp/transformer/transformer_test.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Test Transformer model."""
"""Test Transformer model."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.nlp.transformer
import
model_params
from
official.nlp.transformer
import
model_params
...
...
official/nlp/transformer/translate.py
View file @
89fd2bb1
...
@@ -14,10 +14,6 @@
...
@@ -14,10 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Translate text or files using trained transformer model."""
"""Translate text or files using trained transformer model."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
# Import libraries
# Import libraries
from
absl
import
logging
from
absl
import
logging
import
numpy
as
np
import
numpy
as
np
...
...
official/nlp/xlnet/common_flags.py
View file @
89fd2bb1
...
@@ -13,10 +13,6 @@
...
@@ -13,10 +13,6 @@
# limitations under the License.
# limitations under the License.
# ==============================================================================
# ==============================================================================
"""Common flags used in XLNet model."""
"""Common flags used in XLNet model."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
absl
import
flags
from
absl
import
flags
...
...
official/nlp/xlnet/data_utils.py
View file @
89fd2bb1
...
@@ -14,11 +14,6 @@
...
@@ -14,11 +14,6 @@
# ==============================================================================
# ==============================================================================
"""Utilities used for data preparation."""
"""Utilities used for data preparation."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
import
collections
import
collections
import
json
import
json
import
os
import
os
...
...
official/nlp/xlnet/optimization.py
View file @
89fd2bb1
...
@@ -13,10 +13,6 @@
...
@@ -13,10 +13,6 @@
# limitations under the License.
# limitations under the License.
# ==============================================================================
# ==============================================================================
"""Functions and classes related to optimization (weight updates)."""
"""Functions and classes related to optimization (weight updates)."""
from
__future__
import
absolute_import
from
__future__
import
division
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
absl
import
logging
from
absl
import
logging
import
tensorflow
as
tf
import
tensorflow
as
tf
...
...
official/nlp/xlnet/preprocess_classification_data.py
View file @
89fd2bb1
...
@@ -13,9 +13,6 @@
...
@@ -13,9 +13,6 @@
# limitations under the License.
# limitations under the License.
# ==============================================================================
# ==============================================================================
"""Script to pre-process classification data into tfrecords."""
"""Script to pre-process classification data into tfrecords."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
collections
import
collections
import
csv
import
csv
...
...
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