(self, inputs_shape)
| 3819 | return self.units |
| 3820 | |
| 3821 | def build(self, inputs_shape): |
| 3822 | if inputs_shape[-1] is None: |
| 3823 | raise ValueError("Expected inputs.shape[-1] to be known, saw shape: %s" |
| 3824 | % str(inputs_shape)) |
| 3825 | |
| 3826 | input_size = inputs_shape[-1] |
| 3827 | # pylint: disable=protected-access |
| 3828 | # self._kernel contains W_x, W, V |
| 3829 | self.kernel = self.add_weight( |
| 3830 | name=rnn_cell_impl._WEIGHTS_VARIABLE_NAME, |
| 3831 | shape=[input_size + 2 * self.units, self.units], |
| 3832 | initializer=self.kernel_initializer) |
| 3833 | self.bias = self.add_weight( |
| 3834 | name=rnn_cell_impl._BIAS_VARIABLE_NAME, |
| 3835 | shape=[self.units], |
| 3836 | initializer=self.bias_initializer) |
| 3837 | # pylint: enable=protected-access |
| 3838 | |
| 3839 | self.built = True |
| 3840 | |
| 3841 | def call(self, inputs, state): |
| 3842 | """Run one step of MinimalRNN. |
nothing calls this directly
no test coverage detected