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
4c506585
"vscode:/vscode.git/clone" did not exist on "b9f78c9ba1c79a49ca7d8ca8f75e148c83d221f6"
Commit
4c506585
authored
Jul 07, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Jul 07, 2020
Browse files
Remove TODOs that will never fulfill.
PiperOrigin-RevId: 320124801
parent
c0fbb20d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
7 deletions
+0
-7
official/modeling/tf_utils.py
official/modeling/tf_utils.py
+0
-1
official/nlp/bert/model_training_utils.py
official/nlp/bert/model_training_utils.py
+0
-1
official/nlp/transformer/transformer.py
official/nlp/transformer/transformer.py
+0
-2
official/nlp/transformer/transformer_main.py
official/nlp/transformer/transformer_main.py
+0
-3
No files found.
official/modeling/tf_utils.py
View file @
4c506585
...
...
@@ -88,7 +88,6 @@ def is_special_none_tensor(tensor):
return
tensor
.
shape
.
ndims
==
0
and
tensor
.
dtype
==
tf
.
int32
# TODO(hongkuny): consider moving custom string-map lookup to keras api.
def
get_activation
(
identifier
):
"""Maps a identifier to a Python function, e.g., "relu" => `tf.nn.relu`.
...
...
official/nlp/bert/model_training_utils.py
View file @
4c506585
...
...
@@ -559,7 +559,6 @@ def run_customized_training_loop(
for
metric
in
model
.
metrics
:
training_summary
[
metric
.
name
]
=
_float_metric_value
(
metric
)
if
eval_metrics
:
# TODO(hongkuny): Cleans up summary reporting in text.
training_summary
[
'last_train_metrics'
]
=
_float_metric_value
(
train_metrics
[
0
])
training_summary
[
'eval_metrics'
]
=
_float_metric_value
(
eval_metrics
[
0
])
...
...
official/nlp/transformer/transformer.py
View file @
4c506585
...
...
@@ -52,7 +52,6 @@ def create_model(params, is_train):
logits
=
tf
.
keras
.
layers
.
Lambda
(
lambda
x
:
x
,
name
=
"logits"
,
dtype
=
tf
.
float32
)(
logits
)
model
=
tf
.
keras
.
Model
([
inputs
,
targets
],
logits
)
# TODO(reedwm): Can we do this loss in float16 instead of float32?
loss
=
metrics
.
transformer_loss
(
logits
,
targets
,
label_smoothing
,
vocab_size
)
model
.
add_loss
(
loss
)
...
...
@@ -238,7 +237,6 @@ class Transformer(tf.keras.Model):
decoder_self_attention_bias
=
model_utils
.
get_decoder_self_attention_bias
(
max_decode_length
,
dtype
=
self
.
params
[
"dtype"
])
# TODO(b/139770046): Refactor code with better naming of i.
def
symbols_to_logits_fn
(
ids
,
i
,
cache
):
"""Generate logits for next potential IDs.
...
...
official/nlp/transformer/transformer_main.py
View file @
4c506585
...
...
@@ -248,7 +248,6 @@ class TransformerTask(object):
callbacks
=
[
cb
for
cb
in
callbacks
if
isinstance
(
cb
,
keras_utils
.
TimeHistory
)]
# TODO(b/139418525): Refactor the custom training loop logic.
@
tf
.
function
def
train_steps
(
iterator
,
steps
):
"""Training steps function for TPU runs.
...
...
@@ -422,8 +421,6 @@ class TransformerTask(object):
"""Loads model weights when it is provided."""
if
init_weight_path
:
logging
.
info
(
"Load weights: {}"
.
format
(
init_weight_path
))
# TODO(b/139414977): Having the same variable restoring method for both
# TPU and GPU.
if
self
.
use_tpu
:
checkpoint
=
tf
.
train
.
Checkpoint
(
model
=
model
,
optimizer
=
self
.
_create_optimizer
())
...
...
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