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

Function exportDepthwiseCNNModel

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

Source from the content-addressed store, hash-verified

120}
121
122async function exportDepthwiseCNNModel(exportPath) {
123 const model = tfl.sequential();
124
125 // Cover depthwise 2D convoluational layer.
126 model.add(tfl.layers.depthwiseConv2d({
127 depthMultiplier: 2,
128 kernelSize: [3, 3],
129 strides: [2, 2],
130 inputShape: [40, 40, 3],
131 padding: 'valid',
132 }));
133 model.add(tfl.layers.batchNormalization({}));
134 model.add(tfl.layers.activation({activation: 'relu'}));
135 model.add(tfl.layers.dropout({rate: 0.5}));
136 model.add(tfl.layers.maxPooling2d({poolSize: 2}));
137 model.add(tfl.layers.flatten({}));
138 model.add(tfl.layers.dense({units: 100, activation: 'softmax'}));
139
140 await saveModelAndRandomInputs(model, exportPath);
141}
142
143// SimpleRNN with embedding.
144async function exportSimpleRNNModel(exportPath) {

Callers 1

Calls 4

saveModelAndRandomInputsFunction · 0.85
depthwiseConv2dMethod · 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…