(self, getter, *args, **kwargs)
| 244 | return super(RNNCell, self).__call__(inputs, state) |
| 245 | |
| 246 | def _rnn_get_variable(self, getter, *args, **kwargs): |
| 247 | variable = getter(*args, **kwargs) |
| 248 | if context.executing_eagerly(): |
| 249 | trainable = variable._trainable # pylint: disable=protected-access |
| 250 | else: |
| 251 | trainable = ( |
| 252 | variable in tf_variables.trainable_variables() or |
| 253 | (isinstance(variable, tf_variables.PartitionedVariable) and |
| 254 | list(variable)[0] in tf_variables.trainable_variables())) |
| 255 | if trainable and all(variable is not v for v in self._trainable_weights): |
| 256 | self._trainable_weights.append(variable) |
| 257 | elif not trainable and all( |
| 258 | variable is not v for v in self._non_trainable_weights): |
| 259 | self._non_trainable_weights.append(variable) |
| 260 | return variable |
| 261 | |
| 262 | @property |
| 263 | def state_size(self): |
nothing calls this directly
no test coverage detected