diff options
author | Eugene Brevdo <ebrevdo@google.com> | 2016-11-23 12:27:29 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-23 12:45:10 -0800 |
commit | 92da8abfd35b93488ed7a55308b8f589ee23b622 (patch) | |
tree | 481798091b54e269a6ac7fb7a2c185d34a512a60 /bower.BUILD | |
parent | 75254c37f8289dd70739fe8c8c5826782b086563 (diff) |
Cleanup and consistency for variable handling in RNNCells.
In the run-up to TF 1.0, we are making RNNCells' variable names compatible
with those of tf layers.
This is a breaking change for those who wish to reload their old RNN model
checkpoints in newly created graphs. After this change is in, variables
created with RNNCells will have slightly different names than before;
loading old checkpoints to run with newly created graphs requires
renaming at load time.
Loading and executing old graphs with old checkpoints will continue to work
without any problems. Creating and loading new checkpoints with graphs
after this change is in will work without any problems. The only people
affected by this change are those who want to load old RNN model checkpoints
graphs created after this change is in.
Renaming on checkpoint load can be performed with
tf.contrib.framework.variables.assign_from_checkpoint. Example usage
is available here[1] if you use Saver and/or Supervisor, and [2] if you
are using the newer tf.learn classes.
Examples of renamed parameters:
LSTMCell without sharding:
my_scope/LSTMCell/W_0 -> my_scope/lstm_cell/weights
my_scope/LSTMCell/W_F_diag -> my_scope/lstm_cell/w_f_diag
my_scope/LSTMCell/B -> my_scope/lstm_cell/biases
LSTMCell with sharding:
my_scope/LSTMCell/W_0 -> my_scope/lstm_cell/weights/part_0
my_scope/LSTMCell/W_1 -> my_scope/lstm_cell/weights/part_1
my_scope/LSTMCell/W_2 -> my_scope/lstm_cell/weights/part_2
my_scope/LSTMCell/W_F_diag -> my_scope/lstm_cell/w_f_diag
my_scope/LSTMCell/B -> my_scope/lstm_cell/biases
BasicLSTMCell:
my_scope/BasicLSTMCell/Linear/Matrix -> my_scope/basic_lstm_cell/weights
my_scope/BasicLSTMCell/Linear/Bias -> my_scope/basic_lstm_cell/biases
MultiRNNCell:
my_scope/MultiRNNCell/Cell0/LSTMCell/W_0 -> my_scope/multi_rnn_cell/cell_0/lstm_cell/weights
my_scope/MultiRNNCell/Cell0/LSTMCell/W_F_diag -> my_scope/multi_rnn_cell/cell_0/lstm_cell/w_f_diag
my_scope/MultiRNNCell/Cell0/LSTMCell/B -> my_scope/multi_rnn_cell/cell_0/lstm_cell/biases
1.
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/slim/README.md
2. https://github.com/tensorflow/tensorflow/blob/86f5ab7474825da756838b34e1b4eac93f5fc68a/tensorflow/contrib/framework/python/ops/variables_test.py#L810
Change: 140060366
Diffstat (limited to 'bower.BUILD')
0 files changed, 0 insertions, 0 deletions