(self,
num_units,
activation=None,
reuse=None,
name=None,
dtype=None,
**kwargs)
| 411 | @deprecated(None, "This class is equivalent as tf.keras.layers.SimpleRNNCell," |
| 412 | " and will be replaced by that in Tensorflow 2.0.") |
| 413 | def __init__(self, |
| 414 | num_units, |
| 415 | activation=None, |
| 416 | reuse=None, |
| 417 | name=None, |
| 418 | dtype=None, |
| 419 | **kwargs): |
| 420 | super(BasicRNNCell, self).__init__( |
| 421 | _reuse=reuse, name=name, dtype=dtype, **kwargs) |
| 422 | _check_supported_dtypes(self.dtype) |
| 423 | if context.executing_eagerly() and context.num_gpus() > 0: |
| 424 | logging.warn( |
| 425 | "%s: Note that this cell is not optimized for performance. " |
| 426 | "Please use tf.contrib.cudnn_rnn.CudnnRNNTanh for better " |
| 427 | "performance on GPU.", self) |
| 428 | |
| 429 | # Inputs must be 2-dimensional. |
| 430 | self.input_spec = input_spec.InputSpec(ndim=2) |
| 431 | |
| 432 | self._num_units = num_units |
| 433 | if activation: |
| 434 | self._activation = activations.get(activation) |
| 435 | else: |
| 436 | self._activation = math_ops.tanh |
| 437 | |
| 438 | @property |
| 439 | def state_size(self): |
nothing calls this directly
no test coverage detected