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

Function exportOneDimensionalModel

e2e/integration_tests/create_save_predict.js:189–200  ·  view source on GitHub ↗
(exportPath)

Source from the content-addressed store, hash-verified

187
188// Model with Conv1D and Pooling1D layers.
189async function exportOneDimensionalModel(exportPath) {
190 const model = tfl.sequential();
191 model.add(tfl.layers.conv1d(
192 {filters: 16, kernelSize: [4], inputShape: [80, 1], activation: 'relu'}));
193 model.add(tfl.layers.maxPooling1d({poolSize: 3}));
194 model.add(
195 tfl.layers.conv1d({filters: 8, kernelSize: [3], activation: 'relu'}));
196 model.add(tfl.layers.avgPooling1d({poolSize: 5}));
197 model.add(tfl.layers.flatten());
198
199 await saveModelAndRandomInputs(model, exportPath);
200}
201
202// Functional model with two Merge layers.
203async function exportFunctionalMergeModel(exportPath) {

Callers 1

Calls 4

saveModelAndRandomInputsFunction · 0.85
conv1dMethod · 0.80
flattenMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…