(self, input_shape)
| 142 | |
| 143 | @tf_utils.shape_type_conversion |
| 144 | def build(self, input_shape): |
| 145 | if isinstance(input_shape, list): |
| 146 | input_shape = input_shape[0] |
| 147 | for cell in self.cells: |
| 148 | if isinstance(cell, Layer): |
| 149 | if not cell.built: |
| 150 | cell.build(input_shape) |
| 151 | if getattr(cell, 'output_size', None) is not None: |
| 152 | output_dim = cell.output_size |
| 153 | elif _is_multiple_state(cell.state_size): |
| 154 | output_dim = cell.state_size[0] |
| 155 | else: |
| 156 | output_dim = cell.state_size |
| 157 | input_shape = tuple([input_shape[0]] + |
| 158 | tensor_shape.as_shape(output_dim).as_list()) |
| 159 | self.built = True |
| 160 | |
| 161 | def get_config(self): |
| 162 | cells = [] |
nothing calls this directly
no test coverage detected