()
| 364 | }); |
| 365 | |
| 366 | function createSimpleTwoLayerContainer(): [Container, Layer[]] { |
| 367 | const inputShape = [2, 2]; |
| 368 | const inputLayer = tfl.layers.input({shape: inputShape}); |
| 369 | const layer1 = tfl.layers.reshape({targetShape: [4], name: 'reshapeLayer'}); |
| 370 | const layer1Output = layer1.apply(inputLayer) as tfl.SymbolicTensor; |
| 371 | const layer2 = |
| 372 | tfl.layers.dense({units: 2, useBias: false, name: 'denseLayer'}); |
| 373 | const layer2Output = layer2.apply(layer1Output) as tfl.SymbolicTensor; |
| 374 | const container = |
| 375 | new ContainerForTest({inputs: [inputLayer], outputs: [layer2Output]}); |
| 376 | return [container, [container.inputLayers[0], layer1, layer2]]; |
| 377 | } |
| 378 | |
| 379 | it('getLayer works by name', () => { |
| 380 | const [container, layers] = createSimpleTwoLayerContainer(); |
no test coverage detected
searching dependent graphs…