(self, inputs_shape)
| 445 | |
| 446 | @tf_utils.shape_type_conversion |
| 447 | def build(self, inputs_shape): |
| 448 | if inputs_shape[-1] is None: |
| 449 | raise ValueError("Expected inputs.shape[-1] to be known, saw shape: %s" % |
| 450 | str(inputs_shape)) |
| 451 | _check_supported_dtypes(self.dtype) |
| 452 | |
| 453 | input_depth = inputs_shape[-1] |
| 454 | self._kernel = self.add_variable( |
| 455 | _WEIGHTS_VARIABLE_NAME, |
| 456 | shape=[input_depth + self._num_units, self._num_units]) |
| 457 | self._bias = self.add_variable( |
| 458 | _BIAS_VARIABLE_NAME, |
| 459 | shape=[self._num_units], |
| 460 | initializer=init_ops.zeros_initializer(dtype=self.dtype)) |
| 461 | |
| 462 | self.built = True |
| 463 | |
| 464 | def call(self, inputs, state): |
| 465 | """Most basic RNN: output = new_state = act(W * input + U * state + B).""" |
nothing calls this directly
no test coverage detected