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
7f926353
Commit
7f926353
authored
Feb 13, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Feb 13, 2020
Browse files
[Refactor] TF models: move all contents of transformer to nlp/transformer
PiperOrigin-RevId: 294997928
parent
91c681af
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
10 additions
and
10 deletions
+10
-10
official/nlp/transformer/utils/metrics.py
official/nlp/transformer/utils/metrics.py
+1
-1
official/nlp/transformer/utils/tokenizer.py
official/nlp/transformer/utils/tokenizer.py
+0
-0
official/nlp/transformer/utils/tokenizer_test.py
official/nlp/transformer/utils/tokenizer_test.py
+1
-1
official/r1/transformer/transformer.py
official/r1/transformer/transformer.py
+2
-2
official/r1/transformer/transformer_main.py
official/r1/transformer/transformer_main.py
+3
-3
official/r1/transformer/translate.py
official/r1/transformer/translate.py
+1
-1
official/transformer/utils/__init__.py
official/transformer/utils/__init__.py
+0
-0
official/transformer/v2/__init__.py
official/transformer/v2/__init__.py
+0
-0
official/utils/misc/distribution_utils.py
official/utils/misc/distribution_utils.py
+1
-1
official/utils/misc/distribution_utils_test.py
official/utils/misc/distribution_utils_test.py
+1
-1
No files found.
official/transformer/utils/metrics.py
→
official/
nlp/
transformer/utils/metrics.py
View file @
7f926353
...
...
@@ -33,7 +33,7 @@ import math
import
numpy
as
np
import
six
from
six.moves
import
xrange
# pylint: disable=redefined-builtin
import
tensorflow
as
tf
import
tensorflow
.compat.v1
as
tf
def
_pad_tensors_to_same_length
(
x
,
y
):
...
...
official/transformer/utils/tokenizer.py
→
official/
nlp/
transformer/utils/tokenizer.py
View file @
7f926353
File moved
official/transformer/utils/tokenizer_test.py
→
official/
nlp/
transformer/utils/tokenizer_test.py
View file @
7f926353
...
...
@@ -19,7 +19,7 @@ import tempfile
import
tensorflow
as
tf
# pylint: disable=g-bad-import-order
from
official.transformer.utils
import
tokenizer
from
official.
nlp.
transformer.utils
import
tokenizer
class
SubtokenizerTest
(
tf
.
test
.
TestCase
):
...
...
official/r1/transformer/transformer.py
View file @
7f926353
...
...
@@ -22,14 +22,14 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
# pylint: disable=g-bad-import-order
import
tensorflow
as
tf
from
official.nlp.transformer
import
beam_search_v1
as
beam_search
from
official.nlp.transformer
import
model_utils
from
official.nlp.transformer.utils.tokenizer
import
EOS_ID
from
official.r1.transformer
import
attention_layer
from
official.r1.transformer
import
embedding_layer
from
official.r1.transformer
import
ffn_layer
from
official.transformer.utils.tokenizer
import
EOS_ID
_NEG_INF
=
-
1e9
...
...
official/r1/transformer/transformer_main.py
View file @
7f926353
...
...
@@ -39,9 +39,9 @@ from official.r1.transformer import translate
from
official.r1.transformer
import
transformer
from
official.r1.transformer
import
dataset
from
official.r1.transformer
import
schedule
from
official.transformer
import
compute_bleu
from
official.transformer.utils
import
metrics
from
official.transformer.utils
import
tokenizer
from
official.
nlp.
transformer
import
compute_bleu
from
official.
nlp.
transformer.utils
import
metrics
from
official.
nlp.
transformer.utils
import
tokenizer
from
official.utils.flags
import
core
as
flags_core
from
official.utils.logs
import
hooks_helper
from
official.utils.logs
import
logger
...
...
official/r1/transformer/translate.py
View file @
7f926353
...
...
@@ -26,7 +26,7 @@ from absl import flags
import
tensorflow
as
tf
# pylint: enable=g-bad-import-order
from
official.transformer.utils
import
tokenizer
from
official.
nlp.
transformer.utils
import
tokenizer
from
official.utils.flags
import
core
as
flags_core
_DECODE_BATCH_SIZE
=
32
...
...
official/transformer/utils/__init__.py
deleted
100644 → 0
View file @
91c681af
official/transformer/v2/__init__.py
deleted
100644 → 0
View file @
91c681af
official/utils/misc/distribution_utils.py
View file @
7f926353
...
...
@@ -22,7 +22,7 @@ import json
import
os
import
random
import
string
import
tensorflow
as
tf
import
tensorflow
.compat.v2
as
tf
from
official.utils.misc
import
tpu_lib
...
...
official/utils/misc/distribution_utils_test.py
View file @
7f926353
...
...
@@ -18,7 +18,7 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
tensorflow
as
tf
# pylint: disable=g-bad-import-order
import
tensorflow
.compat.v2
as
tf
from
official.utils.misc
import
distribution_utils
...
...
Prev
1
2
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