(self, inputs_shape)
| 724 | |
| 725 | @tf_utils.shape_type_conversion |
| 726 | def build(self, inputs_shape): |
| 727 | if inputs_shape[-1] is None: |
| 728 | raise ValueError("Expected inputs.shape[-1] to be known, saw shape: %s" % |
| 729 | str(inputs_shape)) |
| 730 | _check_supported_dtypes(self.dtype) |
| 731 | input_depth = inputs_shape[-1] |
| 732 | h_depth = self._num_units |
| 733 | self._kernel = self.add_variable( |
| 734 | _WEIGHTS_VARIABLE_NAME, |
| 735 | shape=[input_depth + h_depth, 4 * self._num_units]) |
| 736 | self._bias = self.add_variable( |
| 737 | _BIAS_VARIABLE_NAME, |
| 738 | shape=[4 * self._num_units], |
| 739 | initializer=init_ops.zeros_initializer(dtype=self.dtype)) |
| 740 | |
| 741 | self.built = True |
| 742 | |
| 743 | def call(self, inputs, state): |
| 744 | """Long short-term memory cell (LSTM). |
nothing calls this directly
no test coverage detected