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
546fd48e
Commit
546fd48e
authored
Mar 13, 2017
by
Neal Wu
Browse files
Additional upgrades to 1.0 and code fixes
parent
4bd29ac0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
92 deletions
+8
-92
slim/train_image_classifier.py
slim/train_image_classifier.py
+5
-5
textsum/seq2seq_attention_model.py
textsum/seq2seq_attention_model.py
+3
-3
tutorials/rnn/linear.py
tutorials/rnn/linear.py
+0
-20
tutorials/rnn/rnn.py
tutorials/rnn/rnn.py
+0
-21
tutorials/rnn/rnn_cell.py
tutorials/rnn/rnn_cell.py
+0
-21
tutorials/rnn/seq2seq.py
tutorials/rnn/seq2seq.py
+0
-22
No files found.
slim/train_image_classifier.py
View file @
546fd48e
...
...
@@ -394,9 +394,9 @@ def main(_):
tf
.
logging
.
set_verbosity
(
tf
.
logging
.
INFO
)
with
tf
.
Graph
().
as_default
():
######################
# Config model_deploy#
######################
######################
#
# Config model_deploy
#
######################
#
deploy_config
=
model_deploy
.
DeploymentConfig
(
num_clones
=
FLAGS
.
num_clones
,
clone_on_cpu
=
FLAGS
.
clone_on_cpu
,
...
...
@@ -414,9 +414,9 @@ def main(_):
dataset
=
dataset_factory
.
get_dataset
(
FLAGS
.
dataset_name
,
FLAGS
.
dataset_split_name
,
FLAGS
.
dataset_dir
)
####################
####################
##
# Select the network #
####################
####################
##
network_fn
=
nets_factory
.
get_network_fn
(
FLAGS
.
model_name
,
num_classes
=
(
dataset
.
num_classes
-
FLAGS
.
labels_offset
),
...
...
textsum/seq2seq_attention_model.py
View file @
546fd48e
...
...
@@ -158,11 +158,11 @@ class Seq2SeqAttentionModel(object):
for
layer_i
in
xrange
(
hps
.
enc_layers
):
with
tf
.
variable_scope
(
'encoder%d'
%
layer_i
),
tf
.
device
(
self
.
_next_device
()):
cell_fw
=
tf
.
nn
.
rnn_cell
.
LSTMCell
(
cell_fw
=
tf
.
contrib
.
rnn
.
LSTMCell
(
hps
.
num_hidden
,
initializer
=
tf
.
random_uniform_initializer
(
-
0.1
,
0.1
,
seed
=
123
),
state_is_tuple
=
False
)
cell_bw
=
tf
.
nn
.
rnn_cell
.
LSTMCell
(
cell_bw
=
tf
.
contrib
.
rnn
.
LSTMCell
(
hps
.
num_hidden
,
initializer
=
tf
.
random_uniform_initializer
(
-
0.1
,
0.1
,
seed
=
113
),
state_is_tuple
=
False
)
...
...
@@ -188,7 +188,7 @@ class Seq2SeqAttentionModel(object):
loop_function
=
_extract_argmax_and_embed
(
embedding
,
(
w
,
v
),
update_embedding
=
False
)
cell
=
tf
.
nn
.
rnn_cell
.
LSTMCell
(
cell
=
tf
.
contrib
.
rnn
.
LSTMCell
(
hps
.
num_hidden
,
initializer
=
tf
.
random_uniform_initializer
(
-
0.1
,
0.1
,
seed
=
113
),
state_is_tuple
=
False
)
...
...
tutorials/rnn/linear.py
deleted
100644 → 0
View file @
4bd29ac0
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Import linear python op for backward compatibility."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
raise
ImportError
(
"This module is deprecated. Use tf.contrib.layers.linear."
)
tutorials/rnn/rnn.py
deleted
100644 → 0
View file @
4bd29ac0
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Import rnn python ops for backward compatibility."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
raise
ImportError
(
"This module is deprecated. Use tf.nn.rnn_* instead."
)
tutorials/rnn/rnn_cell.py
deleted
100644 → 0
View file @
4bd29ac0
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Import rnn_cell python ops for backward compatibility."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
raise
ImportError
(
"This module is deprecated. Use tf.contrib.rnn instead."
)
tutorials/rnn/seq2seq.py
deleted
100644 → 0
View file @
4bd29ac0
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Import seq2seq python ops for backward compatibility."""
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
raise
ImportError
(
"This module is deprecated. Use tf.contrib.legacy_seq2seq instead."
)
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