mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 00:20:20 +01:00
Use identity of param variable in cudnn_rnn.RNNParamsSaveable instead of parameter
variable directly. The RNNParamsSaveable is usually used in a graph which also has a saver for the cudnn param variable itself, if the same op is used for both, fails with a two savers for same op error. PiperOrigin-RevId: 163431826
This commit is contained in:
parent
d629a83165
commit
446450369b
|
|
@ -132,7 +132,7 @@ class RNNParamsSaveable(saver.BaseSaverBuilder.SaveableObject):
|
|||
for param, param_name in zip(params, param_names)
|
||||
]
|
||||
super(RNNParamsSaveable, self).__init__(
|
||||
param_variables[0], specs, name)
|
||||
array_ops.identity(param_variables[0]), specs, name)
|
||||
|
||||
def restore(self, restored_tensors, restored_shapes):
|
||||
if (self._cudnn_rnn.direction == CUDNN_RNN_UNIDIRECTION and
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user