MCPcopy Index your code
hub / github.com/tensorflow/tfjs / createFunctionalModel

Function createFunctionalModel

tfjs-layers/src/engine/training_test.ts:2862–2874  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2860
2861describeMathCPUAndGPU('LayersModel.execute', () => {
2862 function createFunctionalModel():
2863 [tfl.LayersModel, {[name: string]: tfl.SymbolicTensor}] {
2864 const input1 = tfl.input({shape: [2, 3]});
2865 const reshape1 = tfl.layers.reshape({targetShape: [3, 2]}).apply(input1) as
2866 tfl.SymbolicTensor;
2867 const input2 = tfl.input({shape: [3, 4]});
2868 const concat =
2869 tfl.layers.concatenate({axis: -1}).apply([reshape1, input2]) as
2870 tfl.SymbolicTensor;
2871 const model = tfl.model({inputs: [input1, input2], outputs: concat});
2872
2873 return [model, {input1, reshape1, input2, concat}];
2874 }
2875
2876 function createSequentialModel(): tfl.Sequential {
2877 const model = tfl.sequential();

Callers 1

training_test.tsFile · 0.85

Calls 2

reshapeMethod · 0.80
applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…