(inputShape: Shape|Shape[])
| 156 | } |
| 157 | |
| 158 | override build(inputShape: Shape|Shape[]): void { |
| 159 | inputShape = getExactlyOneShape(inputShape); |
| 160 | if (inputShape.length < 3) { |
| 161 | throw new ValueError( |
| 162 | `TimeDistributed layer expects an input shape >= 3D, but received ` + |
| 163 | `input shape ${JSON.stringify(inputShape)}`); |
| 164 | } |
| 165 | this.inputSpec = [{shape: inputShape}]; |
| 166 | const childInputShape = [inputShape[0]].concat(inputShape.slice(2)); |
| 167 | if (!this.layer.built) { |
| 168 | this.layer.build(childInputShape); |
| 169 | this.layer.built = true; |
| 170 | } |
| 171 | super.build(inputShape); |
| 172 | } |
| 173 | |
| 174 | override computeOutputShape(inputShape: Shape|Shape[]): Shape|Shape[] { |
| 175 | inputShape = getExactlyOneShape(inputShape); |
nothing calls this directly
no test coverage detected